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()
|
.userCourse()
|
||||||
.load(profileId, { limit: maxCount, offset: nextIndex });
|
.load(profileId, { limit: maxCount, offset: nextIndex });
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
userId: req.userId,
|
userId: req.userId,
|
||||||
length: items.length.toString(),
|
length: items.length.toString(),
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ export default async function getUserItem(
|
|||||||
|
|
||||||
// Pack the next pagination cookie into bigint compound form
|
// 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:
|
// Done:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user