mirror of
https://github.com/djhackersdev/minime.git
synced 2026-08-22 18:34:14 -05:00
chuni: Prevent recursive item calls if user has more than 600 items
This commit is contained in:
@@ -18,7 +18,6 @@ export default async function getUserCourse(
|
||||
.userCourse()
|
||||
.load(profileId, { limit: maxCount, offset: nextIndex });
|
||||
|
||||
|
||||
return {
|
||||
userId: req.userId,
|
||||
length: items.length.toString(),
|
||||
|
||||
@@ -47,7 +47,7 @@ export default async function getUserItem(
|
||||
|
||||
// Pack the next pagination cookie into bigint compound form
|
||||
|
||||
const xout = itemKindN * itemKindMul + BigInt(maxCount + items.length);
|
||||
const xout = itemKindN * itemKindMul + nextIndexN + BigInt(items.length);
|
||||
|
||||
// Done:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user