rename super user to admin and middleware refactoring

This commit is contained in:
Milo Schwartz 2024-11-05 22:38:57 -05:00
parent 7b755a273c
commit 03051878ef
No known key found for this signature in database
26 changed files with 790 additions and 529 deletions

View file

@ -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`
)
);
}