시드 생성

This commit is contained in:
2025-04-24 12:01:51 +09:00
parent beac42d60c
commit 7fa99e6988
42 changed files with 938 additions and 1170 deletions
+4 -11
View File
@@ -156,8 +156,8 @@ exports.createClub = async (req, res) => {
// 클럽 정보 업데이트
exports.updateClub = async (req, res) => {
try {
const { clubId, name, location, description, contact, ownerEmail, status } = req.body;
const { id, name, location, description, contact, ownerEmail, status } = req.body;
const clubId = id || req.params.id;
const club = await Club.findByPk(clubId);
if (!club) {
@@ -519,7 +519,6 @@ exports.getNextMeeting = async (req, res) => {
},
include: [{
model: EventParticipant,
as: 'participants',
where: {
status: { [Op.ne]: '취소' }
},
@@ -563,7 +562,6 @@ exports.getLastMeeting = async (req, res) => {
},
include: [{
model: EventParticipant,
as: 'participants',
where: {
status: { [Op.ne]: '취소' }
},
@@ -611,10 +609,8 @@ exports.getScoreStats = async (req, res) => {
},
include: [{
model: EventParticipant,
as: 'participants',
include: [{
model: EventScore,
as: 'scores'
model: EventScore
}]
}]
});
@@ -690,7 +686,6 @@ exports.getRecentMeetings = async (req, res) => {
},
include: [{
model: EventParticipant,
as: 'participants',
where: {
status: { [Op.ne]: '취소' }
},
@@ -796,10 +791,8 @@ exports.getStatistics = async (req, res) => {
},
include: [{
model: EventParticipant,
as: 'participants',
include: [{
model: EventScore,
as: 'scores'
model: EventScore
}]
}]
});