From 2192ac97c3d00b04dd07ac54d781a43569c9f3dc Mon Sep 17 00:00:00 2001 From: leovoon Date: Mon, 18 Jul 2022 16:04:13 +0800 Subject: [PATCH] fix: rename endpoint method to uppercase --- src/auth.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/auth.ts b/src/auth.ts index 383c739..8033fb2 100644 --- a/src/auth.ts +++ b/src/auth.ts @@ -188,7 +188,7 @@ export class Auth { }; } - get: RequestHandler = async (event: RequestEvent): Promise => { + GET: RequestHandler = async (event: RequestEvent): Promise => { const { url } = event; if (url.pathname === this.getPath("csrf")) { @@ -205,7 +205,7 @@ export class Auth { return await this.handleEndpoint(event); }; - post: RequestHandler = async (event: RequestEvent) => { + POST: RequestHandler = async (event: RequestEvent) => { return await this.handleEndpoint(event); };