Fix error 500 when resetting password if bad input.

This commit is contained in:
Sébastien Moratinos 2014-02-03 00:01:40 +01:00
parent 3b16145d39
commit 8895f12aff

View file

@ -56,7 +56,7 @@ module.exports.setupRoutes = (app) ->
app.post('/auth/reset', (req, res) ->
unless req.body.email
return errors.badInput(res, [{message:'Need an email specified.', property:email}])
return errors.badInput(res, [{message:'Need an email specified.', property:'email'}])
User.findOne({emailLower:req.body.email.toLowerCase()}).exec((err, user) ->
if not user