feat: create script to initialize "next episode" queue

This commit is contained in:
2024-09-09 05:07:21 -05:00
parent 336701a84b
commit 25ed096b38
6 changed files with 150 additions and 9 deletions

View File

@@ -39,10 +39,13 @@ app.post(
aniListId: number;
episodeNumber: number;
}>();
console.log(
`Internal new episode route, aniListId: ${aniListId}, episodeNumber: ${episodeNumber}`,
);
if (!(await verifyQstashHeader(env<Env, typeof c>(c, "workerd"), c.req))) {
return c.json(ErrorResponse, { status: 401 });
}
// if (!(await verifyQstashHeader(env<Env, typeof c>(c, "workerd"), c.req))) {
// return c.json(ErrorResponse, { status: 401 });
// }
const domain = getCurrentDomain(c.req);
const { success, result: fetchEpisodesResult } = await fetch(