From a75d9e3795cbaaf475e1acadc39f2f02b94ffbd2 Mon Sep 17 00:00:00 2001 From: Izan Gil <66965250+SrIzan10@users.noreply.github.com> Date: Fri, 20 Feb 2026 20:25:09 +0100 Subject: [PATCH] chore(admin): remove all users that are not onboarded from the list --- .../app/(ui)/(protected)/api/admin/users/route.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/apps/web/src/app/(ui)/(protected)/api/admin/users/route.ts b/apps/web/src/app/(ui)/(protected)/api/admin/users/route.ts index fb33689..26b6b45 100644 --- a/apps/web/src/app/(ui)/(protected)/api/admin/users/route.ts +++ b/apps/web/src/app/(ui)/(protected)/api/admin/users/route.ts @@ -14,12 +14,13 @@ export async function GET(request: NextRequest) { const users = await prisma.user.findMany({ where: search ? { - OR: [ - { slack_id: { contains: search, mode: 'insensitive' } }, - { email: { contains: search, mode: 'insensitive' } }, - { personalChannel: { name: { contains: search, mode: 'insensitive' } } }, - ], - } + OR: [ + { slack_id: { contains: search, mode: 'insensitive' } }, + { email: { contains: search, mode: 'insensitive' } }, + { personalChannel: { name: { contains: search, mode: 'insensitive' } } }, + ], + hasOnboarded: true, + } : undefined, include: { ban: true, @@ -81,7 +82,7 @@ export async function POST(request: NextRequest) { } if (action === 'unban') { - await prisma.userBan.delete({ where: { userId } }).catch(() => { }); + await prisma.userBan.delete({ where: { userId } }).catch(() => {}); return Response.json({ success: true, message: 'User unbanned' }); }