From d150b2dab73f8887325186dc89568b3027186637 Mon Sep 17 00:00:00 2001 From: afflogy Date: Thu, 20 Feb 2025 10:30:23 +0900 Subject: [PATCH] =?UTF-8?q?[REFACT]=20QA=20:=20=EC=82=AC=EC=9A=A9=EC=9E=90?= =?UTF-8?q?=20=EC=A0=95=EB=B3=B4=20=EC=9E=85=EB=A0=A5=20=EC=98=88=EC=99=B8?= =?UTF-8?q?=20=EC=B2=98=EB=A6=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/repositories/user.repository.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/repositories/user.repository.ts b/src/repositories/user.repository.ts index b48966f..e5d6e24 100644 --- a/src/repositories/user.repository.ts +++ b/src/repositories/user.repository.ts @@ -13,6 +13,11 @@ export const updateConsent = async ( employCategory: string; } ) => { + + if (data.age < 18 && data.age > 36) { + throw new Error("18세 미만, 36세 이상은 가입 불가능합니다."); + } + // 먼저 기존 UserCategory 관계를 삭제 (중복 방지) await prisma.userCategory.deleteMany({ where: { userId },