This commit is contained in:
jason
2026-04-20 15:49:01 -05:00
parent 381a31d607
commit b98837a72c
46 changed files with 8883 additions and 37 deletions
+12
View File
@@ -0,0 +1,12 @@
import { NextResponse } from "next/server";
import { destroyCurrentSession, getSessionUser } from "@/lib/session";
import { audit } from "@/lib/audit";
export async function POST() {
const user = await getSessionUser();
await destroyCurrentSession();
if (user) {
await audit({ actorId: user.id, action: "logout", entity: "User", entityId: user.id });
}
return NextResponse.json({ ok: true });
}