From e6f4ff17e63f73e5cb6ef0be002cf145582d6f89 Mon Sep 17 00:00:00 2001 From: Wo-ogie <siwall0105@gmail.com> Date: Sun, 10 Dec 2023 12:34:57 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=EC=B0=B8=EA=B0=80=EC=9E=90=20?= =?UTF-8?q?=EC=83=9D=EC=84=B1=20=EA=B0=80=EB=8A=A5=20=EC=97=AC=EB=B6=80?= =?UTF-8?q?=EB=A5=BC=20=ED=8C=90=EB=8B=A8=ED=95=A0=20=EB=95=8C=20=EB=AF=B8?= =?UTF-8?q?=ED=8C=85=EC=9D=98=20maxParticipants=EA=B0=80=20null=EC=9D=B8?= =?UTF-8?q?=20=EA=B2=BD=EC=9A=B0=EC=97=90=20=EB=8C=80=ED=95=9C=20=EC=98=88?= =?UTF-8?q?=EC=99=B8=EC=B2=98=EB=A6=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controllers/participant.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/controllers/participant.js b/controllers/participant.js index 902bfb9..e90f554 100644 --- a/controllers/participant.js +++ b/controllers/participant.js @@ -75,7 +75,10 @@ exports.createParticipant = async (req, res, next) => { const meeting = await getMeetingById(meetingId); const currentParticipants = await getNumOfParticipantsByMeetingId(meetingId); - if (currentParticipants >= meeting.maxParticipants) { + if ( + meeting.maxParticipants && + currentParticipants >= meeting.maxParticipants + ) { throw createMaxParticipantsError(); } -- GitLab