summaryrefslogtreecommitdiffstats
path: root/app/auto_teams.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2018-05-16 13:43:22 -0400
committerGitHub <noreply@github.com>2018-05-16 13:43:22 -0400
commit1f6c271b3bedd6656ae7155714423b1b39a669c1 (patch)
tree9ce6390c237cc5f7c16d63addb4372033807cff8 /app/auto_teams.go
parent02f8c18f40cd0e973e4c75b751e8fcbbbd019728 (diff)
downloadchat-1f6c271b3bedd6656ae7155714423b1b39a669c1.tar.gz
chat-1f6c271b3bedd6656ae7155714423b1b39a669c1.tar.bz2
chat-1f6c271b3bedd6656ae7155714423b1b39a669c1.zip
MM-8708 Remove api package (#8784)
* Remove api package * Remove api dependency from cmd package * Remove EnableAPIv3 setting * Update web tests * Add more websocket tests * Move some ws and oauth tests to api4 package * Move command tests into api4 package * Test fixes * Fix msg command test * Add some app file tests
Diffstat (limited to 'app/auto_teams.go')
-rw-r--r--app/auto_teams.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/app/auto_teams.go b/app/auto_teams.go
index 9dce5bd15..e322e8c66 100644
--- a/app/auto_teams.go
+++ b/app/auto_teams.go
@@ -14,7 +14,7 @@ type TeamEnvironment struct {
}
type AutoTeamCreator struct {
- client *model.Client
+ client *model.Client4
Fuzzy bool
NameLength utils.Range
NameCharset string
@@ -24,7 +24,7 @@ type AutoTeamCreator struct {
EmailCharset string
}
-func NewAutoTeamCreator(client *model.Client) *AutoTeamCreator {
+func NewAutoTeamCreator(client *model.Client4) *AutoTeamCreator {
return &AutoTeamCreator{
client: client,
Fuzzy: false,
@@ -57,11 +57,10 @@ func (cfg *AutoTeamCreator) createRandomTeam() (*model.Team, bool) {
Type: model.TEAM_OPEN,
}
- result, err := cfg.client.CreateTeam(team)
+ createdTeam, err := cfg.client.CreateTeam(team)
if err != nil {
return nil, false
}
- createdTeam := result.Data.(*model.Team)
return createdTeam, true
}