summaryrefslogtreecommitdiffstats
path: root/web/web.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2015-09-24 14:52:51 -0400
committerJoram Wilander <jwawilander@gmail.com>2015-09-24 14:52:51 -0400
commit9d136beb02584b68360ec8b5a37bedb0add9ee90 (patch)
tree8a5032a58ab093d770a5f0d2324b49f75fc60fc4 /web/web.go
parent6d3e836668c6e0420d007540e6fa3b67e5875464 (diff)
parent717fab65e0bde0b3395fb6c59cc35c3d1014ef1d (diff)
downloadchat-9d136beb02584b68360ec8b5a37bedb0add9ee90.tar.gz
chat-9d136beb02584b68360ec8b5a37bedb0add9ee90.tar.bz2
chat-9d136beb02584b68360ec8b5a37bedb0add9ee90.zip
Merge pull request #785 from mattermost/PLT-203
Partial fix for PLT-203
Diffstat (limited to 'web/web.go')
-rw-r--r--web/web.go13
1 files changed, 3 insertions, 10 deletions
diff --git a/web/web.go b/web/web.go
index 3b36f3d56..1e435d47f 100644
--- a/web/web.go
+++ b/web/web.go
@@ -145,14 +145,8 @@ func root(c *api.Context, w http.ResponseWriter, r *http.Request) {
return
}
- if len(c.Session.UserId) == 0 {
- page := NewHtmlTemplatePage("signup_team", "Signup")
- page.Render(c, w)
- } else {
- page := NewHtmlTemplatePage("home", "Home")
- page.Props["TeamURL"] = c.GetTeamURL()
- page.Render(c, w)
- }
+ page := NewHtmlTemplatePage("signup_team", "Signup")
+ page.Render(c, w)
}
func signup(c *api.Context, w http.ResponseWriter, r *http.Request) {
@@ -175,8 +169,7 @@ func login(c *api.Context, w http.ResponseWriter, r *http.Request) {
var team *model.Team
if tResult := <-api.Srv.Store.Team().GetByName(teamName); tResult.Err != nil {
l4g.Error("Couldn't find team name=%v, teamURL=%v, err=%v", teamName, c.GetTeamURL(), tResult.Err.Message)
- // This should probably do somthing nicer
- http.Redirect(w, r, "http://"+r.Host, http.StatusTemporaryRedirect)
+ http.Redirect(w, r, api.GetProtocol(r)+"://"+r.Host, http.StatusTemporaryRedirect)
return
} else {
team = tResult.Data.(*model.Team)