-
- Downloads
Fix pagination when fetching user history
Until now the timestamp of the last listed item was used to query the next entries with an earlier timestamp. That works well most of the time but sometimes it can happen that entries have the exact same timestamp, especially for item transactions for when you buy multiple products at once. Now it is using the ids for each type respectively and not the timestamp anymore, which should make it work perfectly.
Showing
- src/components/UserHistory.svelte 7 additions, 4 deletionssrc/components/UserHistory.svelte
- src/routes/admin/user/[id]/history/+page.server.js 3 additions, 3 deletionssrc/routes/admin/user/[id]/history/+page.server.js
- src/routes/api/[slug]/+server.js 12 additions, 3 deletionssrc/routes/api/[slug]/+server.js
- src/routes/api/transactions.ts 33 additions, 24 deletionssrc/routes/api/transactions.ts
- src/routes/history/+page.server.js 1 addition, 1 deletionsrc/routes/history/+page.server.js
Please register or sign in to comment