2026-08-25 07:51:38 +02:00
|
|
|
import { NextResponse } from "next/server";
|
|
|
|
|
import { SESSION_COOKIE_NAME } from "@/lib/auth/session";
|
2026-08-26 08:45:15 +02:00
|
|
|
import { withRouteLogging } from "@/lib/api/with-route-logging";
|
2026-08-25 07:51:38 +02:00
|
|
|
|
2026-08-26 08:45:15 +02:00
|
|
|
export const POST = withRouteLogging("auth.logout", async () => {
|
2026-08-25 07:51:38 +02:00
|
|
|
const res = NextResponse.json({ ok: true });
|
|
|
|
|
res.cookies.delete(SESSION_COOKIE_NAME);
|
|
|
|
|
return res;
|
2026-08-26 08:45:15 +02:00
|
|
|
});
|