Skip to content

Commit

Permalink
revert(api): revert backend/autogen/utils.go before pager fix attempt
Browse files Browse the repository at this point in the history
Refs: 2b793b9
  • Loading branch information
aripot007 committed Jun 4, 2024
1 parent 3c95c99 commit e6a27a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/autogen/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit e6a27a3

Please sign in to comment.