diff --git a/src/main/java/com/gongjakso/server/domain/contest/entity/Contest.java b/src/main/java/com/gongjakso/server/domain/contest/entity/Contest.java index 095d927a..27e82543 100644 --- a/src/main/java/com/gongjakso/server/domain/contest/entity/Contest.java +++ b/src/main/java/com/gongjakso/server/domain/contest/entity/Contest.java @@ -38,7 +38,7 @@ public class Contest extends BaseTimeEntity { @Column(name = "img_url",columnDefinition = "text") private String imgUrl; @Column(name = "view", nullable = false, columnDefinition = "bigint") - private Integer view; + private int view; public void update(UpdateContestDto contest,String imgUrl){ this.title= (contest.title()==null) ? this.title : contest.title(); 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);