결제 수정

This commit is contained in:
2025-05-27 00:18:59 +09:00
parent 666d39704b
commit 27fbf0541d
5 changed files with 47 additions and 9 deletions
+2 -2
View File
@@ -755,7 +755,7 @@ exports.getRecentMeetings = async (req, res) => {
// 사용자 클럽 목록 조회
exports.getUserClubs = async (req, res) => {
try {
// 사용자가 속한 클럽 목록 조회 (Member 테이블 조인)
const { userId } = req.body;
// admin이면 모든 클럽을, 아니면 자신의 클럽만 조회
const hasAdminAccess = isAdmin(req.user);
@@ -768,7 +768,7 @@ exports.getUserClubs = async (req, res) => {
queryOptions.include = [{
model: Member,
where: {
userId: req.user.id
userId: userId
},
attributes: ['memberType']
}];
+3
View File
@@ -89,6 +89,9 @@ Club.associate = (models) => {
through: models.ClubFeature,
foreignKey: 'clubId',
});
// Member와의 관계 추가
Club.hasMany(models.Member, { foreignKey: 'clubId' });
};
module.exports = Club;