Skip to content

Commit

Permalink
fix: dynamic server error ์ˆ˜์ •
Browse files Browse the repository at this point in the history
  • Loading branch information
summermong committed Aug 26, 2024
1 parent fad0e92 commit 7bc505e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/api/logout/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 7bc505e

Please sign in to comment.