add server admin panel to delete users

This commit is contained in:
miloschwartz 2025-03-21 18:04:14 -04:00
parent 83e70cc7c4
commit ec106ab87f
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(