|
@@ -66,6 +66,10 @@ router.post('/passwd', auth, express.json(), async (req, res, next)=>{
|
|
[await bcrypt.hash(req.body.new_pass, 8), req.user.id]
|
|
[await bcrypt.hash(req.body.new_pass, 8), req.user.id]
|
|
);
|
|
);
|
|
invalidate_cached_user(req.user);
|
|
invalidate_cached_user(req.user);
|
|
|
|
+
|
|
|
|
+ const svc_email = req.services.get('email');
|
|
|
|
+ svc_email.send_email({ email: user.email }, 'password_change_notification');
|
|
|
|
+
|
|
return res.send('Password successfully updated.')
|
|
return res.send('Password successfully updated.')
|
|
}
|
|
}
|
|
}catch(e){
|
|
}catch(e){
|