mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-07-01 03:29:12 +02:00
Show error message when sending password request mail fails
It used to fail silently (client only displays error when a message is available).
This commit is contained in:
@@ -77,6 +77,10 @@ exports.forgot = function(req, res, next) {
|
||||
res.send({
|
||||
message: 'An email has been sent to ' + user.email + ' with further instructions.'
|
||||
});
|
||||
} else {
|
||||
return res.status(400).send({
|
||||
message: 'Failure sending email'
|
||||
});
|
||||
}
|
||||
|
||||
done(err);
|
||||
|
||||
Reference in New Issue
Block a user