From 88a23c590d0eb78b5811e431a890acc53e374160 Mon Sep 17 00:00:00 2001 From: Tobias Johansson Date: Fri, 23 Aug 2024 09:07:10 +0200 Subject: [PATCH] fix(SW-165): fix issue with pagination now showing --- server/routers/user/query.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/routers/user/query.ts b/server/routers/user/query.ts index 053bbb5dd..dfb65400b 100644 --- a/server/routers/user/query.ts +++ b/server/routers/user/query.ts @@ -539,11 +539,12 @@ export const userQueryRouter = router({ return dateA > dateB ? -1 : 1 }) - .slice(limit * (page - 1), limit * page) + + const slicedData = pageData.slice(limit * (page - 1), limit * page) return { data: { - transactions: pageData.map(({ type, attributes }) => { + transactions: slicedData.map(({ type, attributes }) => { return { type, awardPoints: attributes.awardPoints,