move comment for user is false next to if statment

This commit is contained in:
Henry Oswald 2016-09-20 14:50:26 +01:00
parent 4eada48638
commit 777cbf1c80

View file

@ -38,10 +38,9 @@ module.exports = AuthenticationController =
# so we can send back our custom `{message: {text: "", type: ""}}` responses on failure, # so we can send back our custom `{message: {text: "", type: ""}}` responses on failure,
# and send a `{redir: ""}` response on success # and send a `{redir: ""}` response on success
passport.authenticate('local', (err, user, info) -> passport.authenticate('local', (err, user, info) ->
# `user` is either a user object or false
if err? if err?
return next(err) return next(err)
if user if user # `user` is either a user object or false
req.login user, (err) -> req.login user, (err) ->
res.json {redir: req._redir} res.json {redir: req._redir}
else else