Skip to content

Commit

Permalink
📝 InquiryRepository 의 find 메서드에 내림차순 옵션 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
uuuuuuuk committed Dec 20, 2023
1 parent 6d34d7e commit fce51bb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ListAllInquiryServiceImpl(
) : ListAllInquiryService {

override fun execute(): ListInquiryResponseDto = ListInquiryResponseDto(
inquiryList = inquiryRepository.findAll()
inquiryList = inquiryRepository.findAllByOrderByCreatedDateDesc()
.map { InquiryResponseDto(it) }
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ListMyInquiryServiceImpl(

val user = userUtil.currentUser()

val inquiry = inquiryRepository.findByUser(user)
val inquiry = inquiryRepository.findByUserOrderByCreatedDateDesc(user)
?: throw InquiryNotFoundException()

return ListInquiryResponseDto(
Expand Down

0 comments on commit fce51bb

Please sign in to comment.