fix: moderators can delete problems

pull/1/head
parent dda2e2c36f
commit 16fd08d4bc

@ -199,9 +199,9 @@ export async function createApiRouter() {
return
}
if (user.role !== 'admin') {
if (!isAdministrator(user.role)) {
res.status(StatusCodes.UNAUTHORIZED)
res.send(`only an admin can delete this entity`)
res.send(`only administrators can delete this entity`)
return
}

Loading…
Cancel
Save