WiP on permissions

Table of shares per user
This commit is contained in:
Tomas Bures 2017-07-27 17:11:22 +03:00
parent 89c9615592
commit 89256d62bd
20 changed files with 354 additions and 171 deletions

View file

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