mirror of
https://github.com/fosrl/pangolin.git
synced 2025-07-24 04:34:55 +02:00
add server admin panel to delete users
This commit is contained in:
parent
dbfc8b51aa
commit
0dcfeb3587
10 changed files with 439 additions and 18 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue