diff --git a/app/api/logout/route.ts b/app/api/logout/route.ts index fc17cfad..27db0d98 100644 --- a/app/api/logout/route.ts +++ b/app/api/logout/route.ts @@ -4,10 +4,11 @@ import { NextResponse } from 'next/server'; import { fetchData } from '@/apis/fetch-data'; export async function GET() { + const cookieStore = cookies(); try { const data = await fetchData(`/logout`, 'GET'); - cookies().delete('accessToken'); - cookies().delete('refreshToken'); + cookieStore.delete('accessToken'); + cookieStore.delete('refreshToken'); return NextResponse.json(data); } catch (error) {