Skip to content

Commit

Permalink
🐛 [Bug] AdminTeamUpdate시 팀장 비교 로직 수정 #1006 (#1007)
Browse files Browse the repository at this point in the history
  • Loading branch information
AreSain authored Sep 7, 2024
1 parent 3898aee commit 368be13
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public void updateAgendaTeam(AgendaTeamUpdateDto agendaTeamUpdateDto) {
});

// 팀장이 없는지 확인하는 로직
if (profiles.stream().noneMatch(profile -> profile.getProfile().getIntraId().equals(team.getLeaderIntraId()))) {
if (!updatedTeamMates.contains(team.getLeaderIntraId())) {
throw new NotExistException(TEAM_LEADER_NOT_FOUND);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ void updateAgendaTeamAdminSuccess() throws Exception {
List<AgendaTeamMateReqDto> updateTeamMates = profiles.stream()
.map(profile -> new AgendaTeamMateReqDto(profile.getIntraId()))
.collect(Collectors.toList());
updateTeamMates.add(new AgendaTeamMateReqDto(seoulUserAgendaProfile.getIntraId()));
AgendaTeamUpdateDto updateDto = AgendaTeamUpdateDto.builder()
.teamKey(team.getTeamKey()).teamMates(updateTeamMates)
.teamStatus(AgendaTeamStatus.CONFIRM).teamLocation(Location.MIX)
Expand Down Expand Up @@ -328,6 +329,7 @@ void updateAgendaTeamAdminSuccessWithAddTeammate() throws Exception {
List<AgendaTeamMateReqDto> updateTeamMates = profiles.stream()
.map(profile -> new AgendaTeamMateReqDto(profile.getIntraId()))
.collect(Collectors.toList());
updateTeamMates.add(new AgendaTeamMateReqDto(seoulUserAgendaProfile.getIntraId()));
updateTeamMates.add(new AgendaTeamMateReqDto(newProfile.getIntraId()));
AgendaTeamUpdateDto updateDto = AgendaTeamUpdateDto.builder()
.teamKey(team.getTeamKey()).teamMates(updateTeamMates)
Expand Down Expand Up @@ -437,6 +439,7 @@ void updateAgendaTeamAdminSuccessWithRemoveTeammate() throws Exception {
List<AgendaTeamMateReqDto> updateTeamMates = profiles.stream()
.map(profile -> new AgendaTeamMateReqDto(profile.getIntraId()))
.collect(Collectors.toList());
updateTeamMates.add(new AgendaTeamMateReqDto(seoulUserAgendaProfile.getIntraId()));
AgendaTeamUpdateDto updateDto = AgendaTeamUpdateDto.builder()
.teamKey(team.getTeamKey()).teamMates(updateTeamMates)
.teamStatus(AgendaTeamStatus.CONFIRM).teamLocation(Location.MIX)
Expand Down

0 comments on commit 368be13

Please sign in to comment.