Merge pull request #1255 from sharelatex/ta-remove-teams-redirect

Remove /teams Route

GitOrigin-RevId: d520cae19fd41a1fbba7fb24dd67b5b9accce36f
This commit is contained in:
Timothée Alby 2018-12-12 16:42:29 +02:00 committed by sharelatex
parent 4861a86a21
commit 6e25c872e3

View file

@ -336,16 +336,6 @@ module.exports = class Router
CompileController.getFileFromClsiWithoutUser CompileController.getFileFromClsiWithoutUser
publicApiRouter.post '/api/institutions/confirm_university_domain', AuthenticationController.httpAuth, InstitutionsController.confirmDomain publicApiRouter.post '/api/institutions/confirm_university_domain', AuthenticationController.httpAuth, InstitutionsController.confirmDomain
webRouter.get '/teams', (req, res, next) ->
# Match v1 behaviour - if the user is signed in, show their teams list
# 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
next()
webRouter.get '/chrome', (req, res, next) -> webRouter.get '/chrome', (req, res, next) ->
# Match v1 behaviour - this is used for a Chrome web app # Match v1 behaviour - this is used for a Chrome web app
if AuthenticationController.isUserLoggedIn(req) if AuthenticationController.isUserLoggedIn(req)