Fix revocation

This commit is contained in:
2025-04-22 09:44:49 +03:00
parent 7cc074a086
commit 79fbaa9f43

View File

@@ -0,0 +1,17 @@
import { get, isEmpty } from "radash";
import { eq } from "drizzle-orm";
export default defineEventHandler(async (event) => {
const body = await readBody(event);
const db = useDrizzle();
if (get(body, "updates.authorized") !== false) {
return;
}
await db
.delete(tables.users)
.where(eq(tables.users.id, get(body, "object_id")));
sendNoContent(event);
});