From 3e63a4be8db10c36fbf0f490423717624a6edb7a Mon Sep 17 00:00:00 2001 From: Hammer Date: Wed, 28 Jan 2026 22:03:33 +0000 Subject: [PATCH] Revert "temp: debug endpoint for user account inspection" This reverts commit ac1495a953699827cf74184ac3478b53c25cc1c2. --- src/routes/admin.ts | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/routes/admin.ts b/src/routes/admin.ts index 32ed408..bbc5e89 100644 --- a/src/routes/admin.ts +++ b/src/routes/admin.ts @@ -159,13 +159,3 @@ export const adminRoutes = new Elysia({ prefix: '/admin' }) }, { params: t.Object({ id: t.String() }), }); - - // Temporary debug - check user account records - .get('/debug/user/:email', async ({ params, user, set }: { params: { email: string }; user: any; set: any }) => { - if (user.role !== 'admin') { set.status = 403; throw new Error('Forbidden'); } - const { eq } = await import('drizzle-orm'); - const [u] = await db.select().from(users).where(eq(users.email, params.email)).limit(1); - if (!u) return { error: 'User not found' }; - const accts = await db.select().from(accounts).where(eq(accounts.userId, u.id)); - return { user: { ...u }, accounts: accts.map(a => ({ ...a, password: a.password ? '[REDACTED]' : null })) }; - })