front end fixes

This commit is contained in:
2020-07-01 16:08:19 -04:00
parent b8f632e644
commit fb3e6ca7dc
11 changed files with 92 additions and 82 deletions

View File

@ -52,6 +52,7 @@ router.post('/resetpassword/:token', async function(req, res, next){
if(token.is_valid && 86400000+Number(token.created_on) > (new Date).getTime()){
let user = await User.get(token.created_by);
await user.setPassword(req.body);
token.update({is_valid: false});
return res.json({
message: 'Password has been changed.'
});