From 866daeb2b92407c22f2329dd7cac3778b2ba5fb1 Mon Sep 17 00:00:00 2001 From: Ajeyakrishna <98796547+Ajeyakrishna-k@users.noreply.github.com> Date: Sat, 16 Dec 2023 00:07:15 +0530 Subject: [PATCH 1/2] fix: removes bot auth for POST /roles --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 3f5cb8da..557864a2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -76,7 +76,7 @@ router.all("*", async () => { export default { async fetch(request: Request, env: env): Promise { - const apiUrls = ["/invite"]; + const apiUrls = ["/invite","/roles"]; const url = new URL(request.url); if (request.method === "POST" && !apiUrls.includes(url.pathname)) { const isVerifiedRequest = await verifyBot(request, env); From a6f878a149b5d8729cc9e1e7240732f47ce6df36 Mon Sep 17 00:00:00 2001 From: Ajeyakrishna Date: Sat, 16 Dec 2023 00:32:11 +0530 Subject: [PATCH 2/2] fix/lint-issues --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 557864a2..3f5b4ca0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -76,7 +76,7 @@ router.all("*", async () => { export default { async fetch(request: Request, env: env): Promise { - const apiUrls = ["/invite","/roles"]; + const apiUrls = ["/invite", "/roles"]; const url = new URL(request.url); if (request.method === "POST" && !apiUrls.includes(url.pathname)) { const isVerifiedRequest = await verifyBot(request, env);