fix: currentPage not incrementing when loading watched titles
This commit is contained in:
@@ -129,11 +129,15 @@ app.openapi(route, async (c) => {
|
||||
let hasNextPage = true;
|
||||
|
||||
do {
|
||||
const { mediaList, pageInfo } = await getWatchingTitles(
|
||||
user.name!,
|
||||
currentPage++,
|
||||
aniListToken,
|
||||
);
|
||||
const stub = env.ANILIST_DO.getByName(user.name!);
|
||||
const { mediaList, pageInfo } = await stub
|
||||
.getTitles(
|
||||
user.name!,
|
||||
currentPage++,
|
||||
["CURRENT", "PLANNING", "PAUSED", "REPEATING"],
|
||||
aniListToken,
|
||||
)
|
||||
.then((data) => data!);
|
||||
if (!mediaList) {
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user