Skip to content

Commit

Permalink
feat : 게시판 페이지 조회 API 최신순으로 정렬 방식 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
1000kkannoo committed Aug 17, 2024
1 parent 376b6de commit 2c2ab15
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public List<QnaBoardResponse.ReadQuesionTitle> readQuesionTitles(Long accountId)
*/
// TODO: 8/4/24 QueryDSL 사용 필요해보임
public Page<QnaBoardResponse.ReadQuestion> readQuestions(Integer page, String insuranceType) {
PageRequest paging = PageRequest.of(page, 10, Sort.Direction.ASC, "qnaBoardId");
PageRequest paging = PageRequest.of(page, 10, Sort.Direction.DESC, "qnaBoardId");

if (insuranceType != null) {
Page<QnaBoard> qnaBoardPage = qnaBoardRepository.findByInsuranceTypeAndIsShare(InsuranceType.valueOf(insuranceType), paging, true);
Expand Down

0 comments on commit 2c2ab15

Please sign in to comment.