WiP on permissions
Table of shares per user
This commit is contained in:
parent
89c9615592
commit
89256d62bd
20 changed files with 354 additions and 171 deletions
|
@ -16,7 +16,7 @@ router.getAsync('/users/:userId', passport.loggedIn, async (req, res) => {
|
|||
});
|
||||
|
||||
router.postAsync('/users', passport.loggedIn, passport.csrfProtection, async (req, res) => {
|
||||
await users.create(req.body);
|
||||
await users.create(req.context, req.body);
|
||||
return res.json();
|
||||
});
|
||||
|
||||
|
@ -24,7 +24,7 @@ router.putAsync('/users/:userId', passport.loggedIn, passport.csrfProtection, as
|
|||
const user = req.body;
|
||||
user.id = parseInt(req.params.userId);
|
||||
|
||||
await users.updateWithConsistencyCheck(user);
|
||||
await users.updateWithConsistencyCheck(req.context, user);
|
||||
return res.json();
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue