I have a query that takes pageable as a parameter. I define the direction as DESC but this takes no effect. This is my request. Could you please help me formulate the requests in a way that the results come back sorted in descending order? I have posted my request in the picture below. It works but it does not sort the results
This is the controller code:
@GetMapping
fun listMessages(@RequestParam conversationRef: String,
@RequestParam fromDate: Instant, @RequestParam toDate: Instant,
pageable: Pageable): PaginatedCollection<MessageVO> {
return messageService.listAll(fromDate, toDate, pageable,
conversationRef).data ?: PaginatedCollection(listOf(),
PaginationVO.build(), SortVO.build())
}