// API route: POST /api/logout. Clears the session.
import { verifyCsrf, logOut, type Context } from "@wrnexus/core";

export function POST(ctx: Context): Response {
  if (!verifyCsrf(ctx)) return new Response("Invalid CSRF token", { status: 403 });
  logOut(ctx);
  return Response.json({ ok: true });
}
