Skip to content

Commit

Permalink
Merge pull request #116 from Hanaro-trip-together-bank/feature/moim
Browse files Browse the repository at this point in the history
fix: 내 팀 조회 총무 또는 모임원만 리턴
  • Loading branch information
mummhy0811 authored Jun 4, 2024
2 parents ede9095 + 5ddbdfb commit 510b057
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -41,7 +42,7 @@ public List<TeamServiceListResDto> teamServiceList(Long memberIdx) {

for(int i = 0; i < teams.size(); i++) {
Optional<TeamMember> 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())
Expand Down

0 comments on commit 510b057

Please sign in to comment.