diff --git a/src/main/java/com/tiki/server/team/service/TeamService.java b/src/main/java/com/tiki/server/team/service/TeamService.java index e64458f2..91312e19 100644 --- a/src/main/java/com/tiki/server/team/service/TeamService.java +++ b/src/main/java/com/tiki/server/team/service/TeamService.java @@ -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); }