Skip to content

Commit 8554f97

Browse files
feat: pageable 처리 수정
1 parent 180cc1c commit 8554f97

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

src/main/java/com/back/web7_9_codecrete_be/domain/concerts/controller/ConcertController.java

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,29 +38,25 @@ public class ConcertController {
3838
@Operation(summary = "공연목록", description = "공연 전체 목록을 조회합니다. 시작일자를 기준으로 오름차순 조회합니다.")
3939
@GetMapping("list")
4040
public RsData<List<ConcertItem>> getList (
41-
@RequestParam
42-
@Schema(description = "page입니다. 일단은 ?page={page} 로 넘기시면 됩니다.", example = "1")
43-
int page // todo : pageable로 변경하기
41+
@Schema(description = "페이징 처리 또는 무한 스크롤 구현에 쓸 Pageable 객체입니다.")
42+
Pageable pageable
4443
) {
45-
Pageable pageable = PageRequest.of(page, 10, Sort.by("startDate").ascending());
4644
return RsData.success(concertService.getConcertsList(pageable));
4745
}
4846

4947
@Operation(summary = "다가오는 공연 목록", description = "오늘을 기준으로 다가오는 공연 목록을 조회합니다.")
5048
@GetMapping("upComingList")
5149
public RsData<List<ConcertItem>> getUpComingList (
52-
@RequestParam
53-
@Schema(description = "page입니다. 일단은 ?page={page} 로 넘기시면 됩니다.", example = "1")
54-
int page // todo : pageable로 변경하기
50+
@Schema(description = "페이징 처리 또는 무한 스크롤 구현에 쓸 Pageable 객체입니다.")
51+
Pageable pageable
5552
) {
56-
Pageable pageable = PageRequest.of(page, 10);
5753
return RsData.success(concertService.getUpcomingConcertsList(pageable));
5854
}
5955

6056
@Operation(summary = "좋아요 한 공연 조회", description = "좋아요를 누른 공연에 대한 목록을 조회합니다. 저장 날짜를 기준으로 내림차순 정렬로 표시합니다.(최신으로 추가된 목록순입니다.)")
6157
@GetMapping("likedConcertList")
6258
public RsData<List<ConcertItem>> getLikedConcertList (
63-
@RequestParam
59+
@Schema(description = "페이징 처리 또는 무한 스크롤 구현에 쓸 Pageable 객체입니다.")
6460
Pageable pageable
6561
){
6662
User user = rq.getUser();

0 commit comments

Comments
 (0)