mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
move comment for user is false next to if statment
This commit is contained in:
parent
4eada48638
commit
777cbf1c80
1 changed files with 1 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue