From 21cda6716309b3c1e6bdeec4dda7c6580540369c Mon Sep 17 00:00:00 2001 From: Calvin Montgomery Date: Sat, 20 Jul 2013 21:38:03 -0400 Subject: [PATCH] Fix password reset not returning a response --- api.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api.js b/api.js index 89f80006..6d5bf869 100644 --- a/api.js +++ b/api.js @@ -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 });