diff --git a/src/main/java/com/example/waggle/domain/schedule/service/team/TeamCommandService.java b/src/main/java/com/example/waggle/domain/schedule/service/team/TeamCommandService.java index 5796e6ce..6c63e61b 100644 --- a/src/main/java/com/example/waggle/domain/schedule/service/team/TeamCommandService.java +++ b/src/main/java/com/example/waggle/domain/schedule/service/team/TeamCommandService.java @@ -11,8 +11,6 @@ public interface TeamCommandService { void deleteTeam(Long teamId, Member member); - Long addTeamMemberByLeader(Long teamId, Long newMemberId, Member member); - void deleteTeamMemberByLeader(Long teamId, Long memberId, Member leader); void deleteTeamMemberByMyself(Long teamId, Member member); diff --git a/src/main/java/com/example/waggle/domain/schedule/service/team/TeamCommandServiceImpl.java b/src/main/java/com/example/waggle/domain/schedule/service/team/TeamCommandServiceImpl.java index 236d2b72..049d5ceb 100644 --- a/src/main/java/com/example/waggle/domain/schedule/service/team/TeamCommandServiceImpl.java +++ b/src/main/java/com/example/waggle/domain/schedule/service/team/TeamCommandServiceImpl.java @@ -71,25 +71,6 @@ public void deleteTeam(Long teamId, Member member) { teamRepository.delete(team); } - @Override - //no usages인데 지워도 되나요 - public Long addTeamMemberByLeader(Long teamId, Long newMemberId, Member leader) { - Team team = teamRepository.findById(teamId) - .orElseThrow(() -> new TeamHandler(ErrorStatus.TEAM_NOT_FOUND)); - Member newMember = memberRepository.findById(newMemberId) - .orElseThrow(() -> new MemberHandler(ErrorStatus.MEMBER_NOT_FOUND)); - Participation participation = buildParticipation(newMember, team); - participation.setStatus(ParticipationStatus.ACCEPTED); - - validateCallerIsLeader(team, leader); - validateMemberDuplication(team, newMember); - validateLimitOfTeamCapacity(team); - addMemberToTeam(team, leader); - participationRepository.save(participation); - - return team.getId(); - } - @Override public void deleteTeamMemberByLeader(Long teamId, Long memberId, Member leader) { Team team = teamRepository.findById(teamId)