am i high?
This commit is contained in:
@@ -39,7 +39,6 @@ checkDuplicateUsernameOrEmail = (req, res, next) => {
|
|||||||
|
|
||||||
checkRolesExisted = (req, res, next) => {
|
checkRolesExisted = (req, res, next) => {
|
||||||
if (req.body.roles) {
|
if (req.body.roles) {
|
||||||
for (let i = 0; i < req.body.roles.length; i++) {
|
|
||||||
if (!ROLES.includes(req.body.roles[i])) {
|
if (!ROLES.includes(req.body.roles[i])) {
|
||||||
res.status(400).send({
|
res.status(400).send({
|
||||||
message: `oof! ce role ${req.body.roles[i]} n'existe pas`
|
message: `oof! ce role ${req.body.roles[i]} n'existe pas`
|
||||||
@@ -47,7 +46,6 @@ checkRolesExisted = (req, res, next) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
next();
|
next();
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user