add server admin panel to delete users

This commit is contained in:
miloschwartz 2025-03-21 18:04:14 -04:00
parent dbfc8b51aa
commit 0dcfeb3587
No known key found for this signature in database
10 changed files with 439 additions and 18 deletions

View file

@ -14,7 +14,7 @@ export async function verifyUserIsServerAdmin(
createHttpError(HttpCode.UNAUTHORIZED, "User not authenticated")
);
}
try {
if (!req.user?.serverAdmin) {
return next(
@ -24,7 +24,7 @@ export async function verifyUserIsServerAdmin(
)
);
}
return next();
} catch (e) {
return next(