Skip to content

Commit

Permalink
fix: add missing statements
Browse files Browse the repository at this point in the history
  • Loading branch information
PascalinDe committed May 6, 2024
1 parent 3f2ed9d commit 8747b69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/backend/src/controllers/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ usersRouter.post('/add_role', (req, res, next) => {
if ('userId' in req.body) {
try {
readSCIPER(req.body.userId);
addPolicy(req.body.userId, req.body.subject, req.body.permission);
await addPolicy(req.body.userId, req.body.subject, req.body.permission);
} catch (error) {
res.status(400).send(`Error while adding single user to roles: ${error}`);
return;
Expand All @@ -54,7 +54,7 @@ usersRouter.post('/add_role', (req, res, next) => {
} else if ('userIds' in req.body) {
try {
req.body.userIds.every(readSCIPER);
addListPolicy(req.body.userIds, req.body.subject, req.body.permission);
await addListPolicy(req.body.userIds, req.body.subject, req.body.permission);
} catch (error) {
res.status(400).send(`Error while adding multiple users to roles: ${error}`);
return;
Expand Down

0 comments on commit 8747b69

Please sign in to comment.