diff options
author | Corey Hulen <corey@hulen.com> | 2015-07-21 10:47:46 -0800 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2015-07-21 10:47:46 -0800 |
commit | bee26e3f2654ce7acce647818847480569236343 (patch) | |
tree | ad9032009e18b78c3ffca6e9e48fc4467ddd282b /model/client.go | |
parent | dc250d77310e8b38b445bcaa4ae8f2d5df97cc1e (diff) | |
parent | c6fb95912bb481791c1ca370a46a4da9c05d05ad (diff) | |
download | chat-bee26e3f2654ce7acce647818847480569236343.tar.gz chat-bee26e3f2654ce7acce647818847480569236343.tar.bz2 chat-bee26e3f2654ce7acce647818847480569236343.zip |
Merge pull request #200 from mattermost/mm-1356
MM-1356 Changing team URLs from team.domain.com to domain.com/team
Diffstat (limited to 'model/client.go')
-rw-r--r-- | model/client.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/model/client.go b/model/client.go index ab01e7d62..c7e17a6db 100644 --- a/model/client.go +++ b/model/client.go @@ -98,10 +98,10 @@ func (c *Client) Must(result *Result, err *AppError) *Result { return result } -func (c *Client) SignupTeam(email string, name string) (*Result, *AppError) { +func (c *Client) SignupTeam(email string, displayName string) (*Result, *AppError) { m := make(map[string]string) m["email"] = email - m["name"] = name + m["display_name"] = displayName if r, err := c.DoPost("/teams/signup", MapToJson(m)); err != nil { return nil, err } else { @@ -128,11 +128,11 @@ func (c *Client) CreateTeam(team *Team) (*Result, *AppError) { } } -func (c *Client) FindTeamByDomain(domain string, allServers bool) (*Result, *AppError) { +func (c *Client) FindTeamByName(name string, allServers bool) (*Result, *AppError) { m := make(map[string]string) - m["domain"] = domain + m["name"] = name m["all"] = fmt.Sprintf("%v", allServers) - if r, err := c.DoPost("/teams/find_team_by_domain", MapToJson(m)); err != nil { + if r, err := c.DoPost("/teams/find_team_by_name", MapToJson(m)); err != nil { return nil, err } else { val := false @@ -177,7 +177,7 @@ func (c *Client) InviteMembers(invites *Invites) (*Result, *AppError) { } } -func (c *Client) UpdateTeamName(data map[string]string) (*Result, *AppError) { +func (c *Client) UpdateTeamDisplayName(data map[string]string) (*Result, *AppError) { if r, err := c.DoPost("/teams/update_name", MapToJson(data)); err != nil { return nil, err } else { @@ -247,17 +247,17 @@ func (c *Client) LoginById(id string, password string) (*Result, *AppError) { return c.login(m) } -func (c *Client) LoginByEmail(domain string, email string, password string) (*Result, *AppError) { +func (c *Client) LoginByEmail(name string, email string, password string) (*Result, *AppError) { m := make(map[string]string) - m["domain"] = domain + m["name"] = name m["email"] = email m["password"] = password return c.login(m) } -func (c *Client) LoginByEmailWithDevice(domain string, email string, password string, deviceId string) (*Result, *AppError) { +func (c *Client) LoginByEmailWithDevice(name string, email string, password string, deviceId string) (*Result, *AppError) { m := make(map[string]string) - m["domain"] = domain + m["name"] = name m["email"] = email m["password"] = password m["device_id"] = deviceId |