fix: update server admin route

This commit is contained in:
rmoren97 2026-02-13 15:38:23 -08:00
parent bb6844a20b
commit 82c73b4088

View File

@ -39,10 +39,6 @@ export async function DELETE(
return NextResponse.json({ error: 'User is not an admin of this server' }, { status: 404 })
}
if (server.admins.length <= 1) {
return NextResponse.json({ error: 'Cannot remove the last admin from a server' }, { status: 400 })
}
const removedUser = await User.findById(userId, { username: 1 }).lean()
await Server.updateOne(