From a4af29cfa08912c072ca3f158b1b5188923a76bf Mon Sep 17 00:00:00 2001 From: Riley Davis Date: Wed, 7 Dec 2016 11:32:42 -1000 Subject: [PATCH] put things back --- routes/api/user/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/routes/api/user/index.js b/routes/api/user/index.js index fa78b7dfe..1765809ad 100644 --- a/routes/api/user/index.js +++ b/routes/api/user/index.js @@ -125,16 +125,17 @@ router.post('/request-password-reset', (req, res, next) => { rootURL: process.env.TALK_ROOT_URL }) }; - return mailer.sendSimple(options); }) .then(() => { + // we want to send a 204 regardless of the user being found in the db // if we fail on missing emails, it would reveal if people are registered or not. res.status(204).end(); }) .catch(error => { const errorMsg = typeof error === 'string' ? error : error.message; + res.status(500).json({error: errorMsg}); }); });