Skip to content

Commit bf99b14

Browse files
authored
Merge pull request #100 from Move-Log/main
[HOTFIX] 페이징 관련 오류 수정
2 parents 3bd97cd + f0695b2 commit bf99b14

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/com/movelog/domain/news/application/NewsService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public Page<RecentNewsRes> getRecentNews(UserPrincipal userPrincipal, Integer pa
9393
int pageNumber = (page == null || page < 0) ? 0 : page;
9494

9595
// page 적용 및 정렬 추가
96-
Pageable pageable = PageRequest.of(pageNumber, 15, Sort.by(Sort.Direction.ASC, "actionTime"));
96+
Pageable pageable = PageRequest.of(pageNumber, 15);
9797

9898
// 최근 일주일간 생성한 뉴스 목록 조회
9999
LocalDateTime createdAt = LocalDateTime.now().minusDays(7);
@@ -149,7 +149,7 @@ public Page<NewsCalendarRes> getNewsByDate(UserPrincipal userPrincipal, String d
149149
LocalDateTime end = LocalDateTime.parse(date + "T23:59:59");
150150

151151
// page 적용 및 정렬 추가
152-
Pageable pageable = PageRequest.of(page, 15, Sort.by(Sort.Direction.ASC, "actionTime"));
152+
Pageable pageable = PageRequest.of(page, 15);
153153

154154
Page<News> newsList = newsRepository.findNewsByUserAndCreatedAtBetween(user, start, end, pageable);
155155

0 commit comments

Comments
 (0)