mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-26 14:56:39 +00:00
rename super user to admin and middleware refactoring
This commit is contained in:
@@ -61,11 +61,11 @@ export async function deleteRole(
|
||||
);
|
||||
}
|
||||
|
||||
if (role[0].isSuperUserRole) {
|
||||
if (role[0].isAdmin) {
|
||||
return next(
|
||||
createHttpError(
|
||||
HttpCode.FORBIDDEN,
|
||||
`Cannot delete a Super User role`
|
||||
`Cannot delete a Admin role`
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user