|
|
@ -47,13 +47,14 @@ router.post('/recover', parseJSON, validate.validEmail('email'), async (req, res
|
|
|
|
|
|
|
|
|
|
|
|
if(user)
|
|
|
|
if(user)
|
|
|
|
email.sendPasswordReset(user)
|
|
|
|
email.sendPasswordReset(user)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
email.sendNoSuchAccount(req.body.email)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
res.end()
|
|
|
|
res.end()
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
router.post('/recover/password', parseJSON,
|
|
|
|
router.post('/recover/password', parseJSON,
|
|
|
|
validate.validPassword('password'),
|
|
|
|
validate.validPassword('password'),
|
|
|
|
validate.bothPasswordsMatch, async (req, res) => {
|
|
|
|
validate.bothPasswordsMatch, async (req, res) => {
|
|
|
|
const {password, link_uuid, link_key} = req.body
|
|
|
|
const {password, link_uuid, link_key} = req.body
|
|
|
|
|
|
|
|
|
|
|
|