From 777cbf1c803bb7f9479768b26b8fc870be3242b5 Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Tue, 20 Sep 2016 14:50:26 +0100 Subject: [PATCH] move comment for user is false next to if statment --- .../Features/Authentication/AuthenticationController.coffee | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/services/web/app/coffee/Features/Authentication/AuthenticationController.coffee b/services/web/app/coffee/Features/Authentication/AuthenticationController.coffee index 4342da9d77..c559aa9d4c 100644 --- a/services/web/app/coffee/Features/Authentication/AuthenticationController.coffee +++ b/services/web/app/coffee/Features/Authentication/AuthenticationController.coffee @@ -38,10 +38,9 @@ module.exports = AuthenticationController = # so we can send back our custom `{message: {text: "", type: ""}}` responses on failure, # and send a `{redir: ""}` response on success passport.authenticate('local', (err, user, info) -> - # `user` is either a user object or false if err? return next(err) - if user + if user # `user` is either a user object or false req.login user, (err) -> res.json {redir: req._redir} else