From e6a27a3a9420e941ef88246a84533c958f35c0b1 Mon Sep 17 00:00:00 2001 From: Aristide Urli Date: Tue, 4 Jun 2024 15:29:31 +0200 Subject: [PATCH] revert(api): revert backend/autogen/utils.go before pager fix attempt Refs: 2b793b9 --- backend/autogen/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/autogen/utils.go b/backend/autogen/utils.go index 9f1f7b2..b90314f 100644 --- a/backend/autogen/utils.go +++ b/backend/autogen/utils.go @@ -101,7 +101,7 @@ func Pager(page *uint64, limit *uint64, count *uint64) (dbPage uint64, pageOut u // We calculate the max page (0 if count is nil) if count != nil { maxPageFloat := float64(*count) / float64(limitOut) - maxPage = uint64(math.Floor(maxPageFloat)) + maxPage = uint64(math.Ceil(maxPageFloat)) } if pageOut > maxPage+1 {