refactor: pass entire request object to verifyQstashHeader

This commit is contained in:
2024-09-06 18:06:13 -05:00
parent 3ded897b77
commit 57fbdfaabe
3 changed files with 7 additions and 21 deletions

View File

@@ -73,14 +73,7 @@ app.openapi(route, async (c) => {
const aniListToken = c.req.header("X-AniList-Token");
if (isRetrying) {
if (
!(await verifyQstashHeader(
env<Env, typeof c>(c, "workerd"),
c.req.path,
c.req.header("Upstash-Signature"),
await c.req.text(),
))
) {
if (!(await verifyQstashHeader(env<Env, typeof c>(c, "workerd"), c.req))) {
return c.json(ErrorResponse, { status: 401 });
}
} else {