first commit
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
// 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 });
|
||||
}
|
||||
Reference in New Issue
Block a user