11 lines
419 B
TypeScript
11 lines
419 B
TypeScript
import { NextResponse } from "next/server";
|
|
import { cookies } from "next/headers";
|
|
import { COOKIE_ACCESS, COOKIE_REFRESH, COOKIE_OPTS } from "@/lib/auth-cookies";
|
|
|
|
export async function POST() {
|
|
const cookieStore = await cookies();
|
|
cookieStore.set(COOKIE_ACCESS, "", { ...COOKIE_OPTS, maxAge: 0 });
|
|
cookieStore.set(COOKIE_REFRESH, "", { ...COOKIE_OPTS, maxAge: 0 });
|
|
return NextResponse.json({ ok: true });
|
|
}
|