Skip to content

Commit

Permalink
[FEAT] 팀 탈퇴 서비스 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
paragon0107 committed Nov 20, 2024
1 parent b9d60bc commit c813d85
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/com/tiki/server/team/service/TeamService.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ public void kickOutMemberFromTeam(final long memberId, final long teamId, final
.forEach(memberTeamManagerDeleter::delete);
}

public void leaveTeam(final long memberId, final long teamId) {
MemberTeamManager memberTeamManager = memberTeamManagerFinder.findByMemberIdAndTeamIdOrElseThrow(memberId, teamId);
memberTeamManagerDeleter.delete(memberTeamManager);
}

private Team createTeam(TeamCreateRequest request, University univ) {
return Team.of(request, univ);
}
Expand Down

0 comments on commit c813d85

Please sign in to comment.