From e1bc174952a361aad550051e0d5a785b84728ed8 Mon Sep 17 00:00:00 2001 From: Augustus Mayo Date: Tue, 3 Oct 2017 13:53:27 -0500 Subject: [PATCH] next is not defined when gsmtp authentication fails --- app/routes/forgot.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/routes/forgot.js b/app/routes/forgot.js index 2072a63..0256559 100644 --- a/app/routes/forgot.js +++ b/app/routes/forgot.js @@ -4,7 +4,7 @@ var crypto = require('crypto'); var async = require('async'); var sendmail = require('../helpers/sendmail'); -router.post('/', function(req, res) +router.post('/', function(req, res, next) { async.waterfall([ function(done) @@ -13,7 +13,7 @@ router.post('/', function(req, res) }, function(token, done) { - User.getByEmail(req.body.email, function(err, user) + User.getByEmail(req.body.email, function(err, user) { if (!user) { @@ -48,7 +48,7 @@ router.post('/', function(req, res) done(err); }); } - ], + ], function(err) { if (err) return next(err);