Migrate to tasks

This commit is contained in:
2025-07-06 12:32:22 +03:00
parent cbc9abf67c
commit f7d994d02e
2 changed files with 69 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
import { get } from "radash";
import { eq } from "drizzle-orm";
export default defineEventHandler(async (event) => {
await validateHookdeck(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);
});