diff --git a/src/main/java/com/hanaro/triptogether/account/service/impl/AccountServiceImpl.java b/src/main/java/com/hanaro/triptogether/account/service/impl/AccountServiceImpl.java index fdbdf09..42b8930 100644 --- a/src/main/java/com/hanaro/triptogether/account/service/impl/AccountServiceImpl.java +++ b/src/main/java/com/hanaro/triptogether/account/service/impl/AccountServiceImpl.java @@ -6,6 +6,7 @@ import com.hanaro.triptogether.account.dto.response.AccountsResDto; import com.hanaro.triptogether.account.dto.response.TeamServiceListResDto; import com.hanaro.triptogether.account.service.AccountService; +import com.hanaro.triptogether.enumeration.TeamMemberState; import com.hanaro.triptogether.exception.ApiException; import com.hanaro.triptogether.exception.ExceptionEnum; import com.hanaro.triptogether.member.domain.Member; @@ -41,7 +42,7 @@ public List teamServiceList(Long memberIdx) { for(int i = 0; i < teams.size(); i++) { Optional teamMember= teamMemberRepository.findTeamMemberByMember_MemberIdxAndTeam_TeamIdx(memberIdx, teams.get(i).getTeamIdx()); - if(teamMember.isPresent()) { + if(teamMember.isPresent() && (teamMember.get().getTeamMemberState() == TeamMemberState.총무 || teamMember.get().getTeamMemberState() == TeamMemberState.모임원)) { Long teamMemberIdx = teamMember.get().getTeamMemberIdx(); TeamServiceListResDto teamServiceListResDto = TeamServiceListResDto.builder() .accIdx(teams.get(i).getAccount().getAccIdx())