chuni: Prevent recursive item calls if user has more than 600 items

This commit is contained in:
Matt Bilker 2020-02-14 18:08:10 +00:00
parent 01198d546a
commit 4c5122d163
2 changed files with 1 additions and 2 deletions

View File

@ -18,7 +18,6 @@ export default async function getUserCourse(
.userCourse()
.load(profileId, { limit: maxCount, offset: nextIndex });
return {
userId: req.userId,
length: items.length.toString(),

View File

@ -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: