From 7d1fe66b99a206a3945c966639e3d5034e0f3a94 Mon Sep 17 00:00:00 2001 From: Stedoss <29103029+Stedoss@users.noreply.github.com> Date: Fri, 11 Apr 2025 00:36:39 +0100 Subject: [PATCH] Fix banlist pagination offset being incorrect Not sure what the point of the pagination variable is there, but we can just use this as a constant for now. --- .../kotlin/com/nisemoe/nise/controller/BanlistController.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nise-backend/src/main/kotlin/com/nisemoe/nise/controller/BanlistController.kt b/nise-backend/src/main/kotlin/com/nisemoe/nise/controller/BanlistController.kt index e48671c..4a791cf 100644 --- a/nise-backend/src/main/kotlin/com/nisemoe/nise/controller/BanlistController.kt +++ b/nise-backend/src/main/kotlin/com/nisemoe/nise/controller/BanlistController.kt @@ -76,7 +76,7 @@ class BanlistController( .where(USERS.IS_BANNED.eq(true)) .orderBy(USERS.APPROX_BAN_DATE.desc()) .limit(MAX_BANLIST_ENTRIES_PER_PAGE) - .offset((request.page - 1) * 10) + .offset((request.page - 1) * MAX_BANLIST_ENTRIES_PER_PAGE) .fetch() .map { BanlistEntry(