mirror of https://github.com/calzoneman/sync.git
Fix password reset not returning a response
This commit is contained in:
parent
212fae9fc8
commit
21cda67163
6
api.js
6
api.js
|
@ -285,17 +285,17 @@ module.exports = function (Server) {
|
||||||
subject: "Password reset request",
|
subject: "Password reset request",
|
||||||
text: msg
|
text: msg
|
||||||
};
|
};
|
||||||
|
var api = this;
|
||||||
Config.MAIL.sendMail(mail, function(err, response) {
|
Config.MAIL.sendMail(mail, function(err, response) {
|
||||||
if(err) {
|
if(err) {
|
||||||
Logger.errlog.log("Mail fail: " + err);
|
Logger.errlog.log("Mail fail: " + err);
|
||||||
this.sendJSON(res, {
|
api.sendJSON(res, {
|
||||||
success: false,
|
success: false,
|
||||||
error: "Email failed. Contact an admin if this persists."
|
error: "Email failed. Contact an admin if this persists."
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.sendJSON(res, {
|
api.sendJSON(res, {
|
||||||
success: true
|
success: true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue