오류 수정

This commit is contained in:
2025-06-19 18:30:28 +09:00
parent caddf36cf2
commit 32267893d5
2 changed files with 9 additions and 6 deletions
+4 -1
View File
@@ -252,7 +252,7 @@ exports.getEventByPublicHash = async (req, res) => {
}]
});
if (!event) return res.status(404).json({ message: '이벤트를 찾을 수 없습니다.' });
if (event.status === '취소') return res.status(403).json({ message: '취소된 이벤트입니다.' });
if (event.status === 'canceled') return res.status(403).json({ message: '취소된 이벤트입니다.' });
// 2. 비밀번호 필요 여부 및 인증
if (event.accessPassword) {
@@ -287,6 +287,7 @@ exports.getEventByPublicHash = async (req, res) => {
}
})
);
console.log('allMembersWithAverage', allMembersWithAverage);
// 4. 참가자 명단 추출 (참가자 테이블 + Member 조인)
const participants = await EventParticipant.findAll({
@@ -571,6 +572,7 @@ exports.updateEvent = async (req, res) => {
gameCount,
laneCount,
status,
registrationDeadline,
publicHash,
accessPassword
} = req.body;
@@ -607,6 +609,7 @@ exports.updateEvent = async (req, res) => {
gameCount: gameCount || event.gameCount,
laneCount: laneCount || event.laneCount,
status: status || event.status,
registrationDeadline: registrationDeadline || event.registrationDeadline,
publicHash: publicHash || event.publicHash,
accessPassword: accessPassword || null
};