From 51fd70cf74d8f7a5d99e00a8ba3512f5be7c43b7 Mon Sep 17 00:00:00 2001 From: Otavio Santana Date: Tue, 16 Apr 2024 05:57:39 +0100 Subject: [PATCH] feat: include order at frui resource Signed-off-by: Otavio Santana --- quarkus-pagination/src/main/java/os/expert/FruitResource.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quarkus-pagination/src/main/java/os/expert/FruitResource.java b/quarkus-pagination/src/main/java/os/expert/FruitResource.java index 6efa3a0..51ff8d3 100644 --- a/quarkus-pagination/src/main/java/os/expert/FruitResource.java +++ b/quarkus-pagination/src/main/java/os/expert/FruitResource.java @@ -43,7 +43,7 @@ public Iterable cursor(@QueryParam("after") @DefaultValue("") String afte var pageRequest = PageRequest.ofSize(size).beforeCursor(PageRequest.Cursor.forKey(before)); return fruitRepository.cursor(pageRequest, DESC).stream().toList(); } - var pageRequest = PageRequest.ofSize(size); + var pageRequest = PageRequest.ofSize(size).size(size); return fruitRepository.cursor(pageRequest, ASC).content(); } }