mirror of
https://github.com/Elysola/WebHooker.git
synced 2026-11-21 01:23:40 +00:00
chore: auto-fix lint & formatting [skip ci]
This commit is contained in:
1 parent
7ebd9aa63f
commit
92ba2203a5
1 file changed
+4
-1
@@ -115,7 +115,10 @@ export async function handleInteractionRequest(request: Request, env: Env): Prom
|
|||||||
return new Response("Invalid signature", { status: 401 });
|
return new Response("Invalid signature", { status: 401 });
|
||||||
}
|
}
|
||||||
const ts = Number(timestamp);
|
const ts = Number(timestamp);
|
||||||
if (!Number.isFinite(ts) || Math.abs(Math.floor(Date.now() / 1000) - ts) > TIMESTAMP_TOLERANCE_SECONDS) {
|
if (
|
||||||
|
!Number.isFinite(ts) ||
|
||||||
|
Math.abs(Math.floor(Date.now() / 1000) - ts) > TIMESTAMP_TOLERANCE_SECONDS
|
||||||
|
) {
|
||||||
return new Response("Invalid signature", { status: 401 });
|
return new Response("Invalid signature", { status: 401 });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user