From 42e3f36c231a4c2486eeb2953410be166d3169a4 Mon Sep 17 00:00:00 2001 From: Bunyawat Naunnak Date: Wed, 3 Jul 2024 19:00:44 +0700 Subject: [PATCH] fix: remove cookie by default --- src/app/api/auth/route.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/app/api/auth/route.ts b/src/app/api/auth/route.ts index fb8cf11..17a8696 100755 --- a/src/app/api/auth/route.ts +++ b/src/app/api/auth/route.ts @@ -89,12 +89,10 @@ export async function GET(req: NextRequest) { const cookieStore = cookies(); const oneDay = 24 * 60 * 60 * 1000; - console.log("DEBUG P OAT user : ", users); - // Remove the student_cookie if it exists const studentCookie = cookieStore.get("student_cookie"); if (studentCookie) { - cookieStore.delete("student_cookie"); + cookieStore.delete("student_id"); } const token: string = await encrypt(users as object);