From c37d209a0ccb843c1eccd122d85689ec816b9c66 Mon Sep 17 00:00:00 2001 From: yumzen Date: Sat, 21 Sep 2024 16:07:03 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20=EA=B3=B5=EB=AA=A8=EC=A0=84=EC=97=90=20?= =?UTF-8?q?=ED=95=B4=EB=8B=B9=ED=95=98=EB=8A=94=20=ED=8C=80=20=EC=A1=B0?= =?UTF-8?q?=ED=9A=8C=20=EC=8B=9C=20=EC=98=88=EC=99=B8=EC=B2=98=EB=A6=AC=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/gongjakso/server/domain/team/service/TeamService.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/gongjakso/server/domain/team/service/TeamService.java b/src/main/java/com/gongjakso/server/domain/team/service/TeamService.java index 3e1dab6e..fd8d91b1 100644 --- a/src/main/java/com/gongjakso/server/domain/team/service/TeamService.java +++ b/src/main/java/com/gongjakso/server/domain/team/service/TeamService.java @@ -158,6 +158,9 @@ public TeamRes getTeam(Long contestId, Long teamId) { .orElseThrow(() -> new ApplicationException(ErrorCode.CONTEST_NOT_FOUND_EXCEPTION)); Team team = teamRepository.findByIdAndDeletedAtIsNull(teamId) .orElseThrow(() -> new ApplicationException(ErrorCode.TEAM_NOT_FOUND_EXCEPTION)); + if(!team.getContest().getId().equals(contestId)) { + throw new ApplicationException(ErrorCode.TEAM_NOT_FOUND_EXCEPTION); + } // Business Logic return TeamRes.of(team);