feat: complete admin invite and user creation and recovery flows

This commit is contained in:
Zoe
2026-10-08 14:24:47 -05:00
parent 61f9bb74b4
commit b6f4d85ed7
23 changed files with 4430 additions and 110 deletions
@@ -0,0 +1,12 @@
import { eq } from 'drizzle-orm';
import { recoveryLinks } from '~~/drizzle/schema';
import { db } from '~~/server/lib/db';
/** Cancels the recovery link of a user, if there is one. */
export default defineEventHandler(async (event) => {
await protectAdminRoute(event);
await db.delete(recoveryLinks).where(eq(recoveryLinks.userId, getRouterParam(event, 'id')!));
return { ok: true };
});