groups and reset

This commit is contained in:
2020-05-15 00:40:15 -04:00
parent e71fccd27c
commit 0889832efc
22 changed files with 1463 additions and 128 deletions

View File

@@ -52,10 +52,13 @@ router.put('/password', async function(req, res, next){
}
});
router.put('/password/:uid', async function(req, res, next){
router.put('/:uid/password', async function(req, res, next){
try{
let user = await User.get(req.params.uid);
return res.json({results: await user.setPassword(req.body)});
return res.json({
results: await user.setPassword(req.body),
message: `User ${user.uid} password changed.`
});
}catch(error){
next(error);
}