Fix password reset not returning a response

This commit is contained in:
Calvin Montgomery 2013-07-20 21:38:03 -04:00
parent 212fae9fc8
commit 21cda67163
1 changed files with 3 additions and 3 deletions

6
api.js
View File

@ -285,17 +285,17 @@ module.exports = function (Server) {
subject: "Password reset request",
text: msg
};
var api = this;
Config.MAIL.sendMail(mail, function(err, response) {
if(err) {
Logger.errlog.log("Mail fail: " + err);
this.sendJSON(res, {
api.sendJSON(res, {
success: false,
error: "Email failed. Contact an admin if this persists."
});
}
else {
this.sendJSON(res, {
api.sendJSON(res, {
success: true
});