Skip to content

Commit

Permalink
fix() : page 시작이 1부터 시작하도록 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
dongkyun0713 committed Feb 19, 2024
1 parent 20eba3b commit be09a3a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class MatchingBoardService {
@Transactional(readOnly = true)
public MatchingPostPagingResponseDto findAllPosts(MatchingPostPagingRequestDto matchingPostPagingRequestDto) {
Sort sort = Sort.by(Sort.Direction.ASC, "matchingPostId");
Pageable pageable = PageRequest.of(matchingPostPagingRequestDto.getPage(), 10, sort); // 페이지 크기를 고정값인 10으로 설정
Pageable pageable = PageRequest.of(matchingPostPagingRequestDto.getPage() + 1, 10, sort); // 페이지 크기를 고정값인 10으로 설정
Page<MatchingPost> matchingPosts = matchingPostRepository.findAll(pageable);
return MatchingPostPagingResponseDto.from(matchingPosts);
}
Expand Down

0 comments on commit be09a3a

Please sign in to comment.