Merge pull request #1064 from sharelatex/as-fix-500-on-teams

Fix 500 on /teams route

GitOrigin-RevId: 9f554f9b77fb7fea64db1ad9c4d8635f47efff9e
This commit is contained in:
Alasdair Smith 2018-10-25 13:37:37 +01:00 committed by sharelatex
parent 27475bd980
commit 27fd090075

View file

@ -340,8 +340,10 @@ module.exports = class Router
# Otherwise show some information about teams
if AuthenticationController.isUserLoggedIn(req)
res.redirect('/user/subscription')
else if Settings.overleaf?.host
res.redirect("#{Settings.overleaf.host}/teams")
else
res.redirect("#{settings.overleaf.host}/teams")
next()
webRouter.get '/chrome', (req, res, next) ->
# Match v1 behaviour - this is used for a Chrome web app