Changing the way we mattermost handles URLs. team.domain.com becomes domain.com/team.

Renaming team.Name to team.DisplayName and team.Domain to team.Name.
So: team.Name -> url safe name. team.DisplayName -> nice name for users
This commit is contained in:
Christopher Speller
2015-07-08 11:50:10 -04:00
parent a1876cf6cc
commit c6fb95912b
86 changed files with 891 additions and 1214 deletions

View File

@@ -57,17 +57,17 @@ func manualTest(c *api.Context, w http.ResponseWriter, r *http.Request) {
// Check for username parameter and create a user if present
username, ok1 := params["username"]
teamname, ok2 := params["teamname"]
teamDisplayName, ok2 := params["teamname"]
var teamID string
var userID string
if ok1 && ok2 {
l4g.Info("Creating user and team")
// Create team for testing
team := &model.Team{
Name: teamname[0],
Domain: utils.RandomName(utils.Range{20, 20}, utils.LOWERCASE),
Email: utils.RandomEmail(utils.Range{20, 20}, utils.LOWERCASE),
Type: model.TEAM_OPEN,
DisplayName: teamDisplayName[0],
Name: utils.RandomName(utils.Range{20, 20}, utils.LOWERCASE),
Email: utils.RandomEmail(utils.Range{20, 20}, utils.LOWERCASE),
Type: model.TEAM_OPEN,
}
if result := <-api.Srv.Store.Team().Save(team); result.Err != nil {