mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user