Files

10 lines
342 B
TypeScript
Raw Permalink Normal View History

import { NextResponse } from "next/server";
import { SESSION_COOKIE_NAME } from "@/lib/auth/session";
import { withRouteLogging } from "@/lib/api/with-route-logging";
export const POST = withRouteLogging("auth.logout", async () => {
const res = NextResponse.json({ ok: true });
res.cookies.delete(SESSION_COOKIE_NAME);
return res;
});