From 2003e58ab1f4f6f61a5dbe88c7d8fbc6c327eefc Mon Sep 17 00:00:00 2001 From: Jaybe Date: Wed, 29 Oct 2025 01:23:18 +0900 Subject: [PATCH] =?UTF-8?q?=EC=BB=A8=ED=8A=B8=EB=A1=A4=EB=9F=AC=20?= =?UTF-8?q?=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/controllers/publicController.js | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/backend/controllers/publicController.js b/backend/controllers/publicController.js index 3e616ff..c71e651 100644 --- a/backend/controllers/publicController.js +++ b/backend/controllers/publicController.js @@ -9,27 +9,6 @@ const averageService = require('../services/averageService'); exports.publicEventEntry = async (req, res) => { const { publicHash } = req.params; const { password } = req.body || {}; - -// 팀 핸디캡 수정 -exports.updateTeamHandicap = async (req, res) => { - const { publicHash } = req.params; - const { teamNumber, handicap } = req.body || {}; - try { - const event = await Event.findOne({ where: { publicHash } }); - if (!event) return res.status(404).json({ message: '이벤트를 찾을 수 없습니다.' }); - if (event.status !== 'ready' && event.status !== 'active') return res.status(403).json({ message: '팀 핸디캡 수정이 불가능한 상태입니다.' }); - - const team = await EventTeam.findOne({ where: { eventId: event.id, teamNumber } }); - if (!team) return res.status(404).json({ message: '팀을 찾을 수 없습니다.' }); - - const hc = Number(handicap) || 0; - await team.update({ handicap: hc }); - return res.json({ message: '팀 핸디캡이 저장되었습니다.', data: { teamNumber, handicap: hc } }); - } catch (e) { - console.error('팀 핸디캡 수정 오류:', e); - res.status(500).json({ message: '팀 핸디캡 저장 중 오류가 발생했습니다.' }); - } -}; const auth = req.headers.authorization; let event; try {