|
17 | 17 | import org.springframework.web.bind.annotation.RequestParam;
|
18 | 18 | import org.springframework.web.bind.annotation.RestController;
|
19 | 19 |
|
20 |
| -import com.ddobang.backend.domain.member.entity.Member; |
21 | 20 | import com.ddobang.backend.domain.member.types.KeywordType;
|
22 | 21 | import com.ddobang.backend.domain.member.types.MemberReviewKeyword;
|
23 | 22 | import com.ddobang.backend.domain.party.dto.PartyDto;
|
24 | 23 | import com.ddobang.backend.domain.party.dto.request.PartyMemberReviewRequest;
|
25 | 24 | import com.ddobang.backend.domain.party.dto.request.PartyRequest;
|
26 | 25 | import com.ddobang.backend.domain.party.dto.request.PartySearchCondition;
|
| 26 | +import com.ddobang.backend.domain.party.dto.response.MyJoinedPartySummaryResponse; |
27 | 27 | import com.ddobang.backend.domain.party.dto.response.PartyDetailResponse;
|
28 | 28 | import com.ddobang.backend.domain.party.dto.response.PartyMainResponse;
|
29 | 29 | import com.ddobang.backend.domain.party.dto.response.PartySummaryResponse;
|
30 | 30 | import com.ddobang.backend.domain.party.service.PartyService;
|
| 31 | +import com.ddobang.backend.domain.party.types.PartyMemberRole; |
| 32 | +import com.ddobang.backend.domain.party.types.PartyTodoFilter; |
31 | 33 | import com.ddobang.backend.global.response.PageDto;
|
32 | 34 | import com.ddobang.backend.global.response.ResponseFactory;
|
33 | 35 | import com.ddobang.backend.global.response.SliceDto;
|
@@ -132,19 +134,25 @@ public ResponseEntity<Void> unexecuteParty(@PathVariable Long id) {
|
132 | 134 | }
|
133 | 135 |
|
134 | 136 | @GetMapping("/joins/{id}")
|
135 |
| - @Operation(summary = "참여한 모임 목록 조회") |
136 |
| - public ResponseEntity<SuccessResponse<PageDto<PartySummaryResponse>>> getJoinedParties( |
| 137 | + @Operation(summary = "다른 사람의 참여한 모임 목록 조회") |
| 138 | + public ResponseEntity<SuccessResponse<PageDto<PartySummaryResponse>>> getOtherJoinedParties( |
137 | 139 | @RequestParam(defaultValue = "0") int page,
|
138 | 140 | @RequestParam(defaultValue = "10") int size,
|
139 | 141 | @PathVariable Long id
|
140 | 142 | ) {
|
141 |
| - Member actor = loginMemberProvider.getCurrentMember(); |
| 143 | + return ResponseFactory.ok(partyService.getOtherJoinedParties(id, page, size)); |
| 144 | + } |
142 | 145 |
|
143 |
| - if (id.equals(actor.getId())) { |
144 |
| - return ResponseFactory.ok(partyService.getMyJoinedParties(actor, page, size)); |
145 |
| - } else { |
146 |
| - return ResponseFactory.ok(partyService.getOtherJoinedParties(id, page, size)); |
147 |
| - } |
| 146 | + @GetMapping("/joins/me") |
| 147 | + @Operation(summary = "내가 참여한 모임 목록 조회") |
| 148 | + public ResponseEntity<SuccessResponse<PageDto<MyJoinedPartySummaryResponse>>> getMyJoinedParties( |
| 149 | + @RequestParam(required = false) PartyMemberRole role, |
| 150 | + @RequestParam(defaultValue = "NONE") PartyTodoFilter todoFilter, |
| 151 | + @RequestParam(defaultValue = "0") int page, |
| 152 | + @RequestParam(defaultValue = "10") int size |
| 153 | + ) { |
| 154 | + return ResponseFactory.ok( |
| 155 | + partyService.getMyJoinedParties(loginMemberProvider.getCurrentMember(), role, todoFilter, page, size)); |
148 | 156 | }
|
149 | 157 |
|
150 | 158 | // 모임원 평가
|
|
0 commit comments