10 lines
304 B
TypeScript
10 lines
304 B
TypeScript
import { NextResponse } from "next/server";
|
|
import { SESSION_COOKIE } from "@/lib/auth";
|
|
|
|
// POST /api/auth/logout — clear the session cookie.
|
|
export async function POST() {
|
|
const res = NextResponse.json({ ok: true });
|
|
res.cookies.set(SESSION_COOKIE, "", { path: "/", maxAge: 0 });
|
|
return res;
|
|
}
|