summaryrefslogtreecommitdiffstats
path: root/api4/team.go
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2017-11-21 13:08:32 -0600
committerChristopher Speller <crspeller@gmail.com>2017-11-21 11:08:32 -0800
commit816a30397da6ceff836d8723233dc5cdbda70871 (patch)
treed9075e04c6570296cea924b97088839f49d6ce9d /api4/team.go
parent01e652ed481ed0ef0a8d8c021751655c1a58dd2a (diff)
downloadchat-816a30397da6ceff836d8723233dc5cdbda70871.tar.gz
chat-816a30397da6ceff836d8723233dc5cdbda70871.tar.bz2
chat-816a30397da6ceff836d8723233dc5cdbda70871.zip
Role refactor (#7867)
* role refactor * add missing file * fix web test
Diffstat (limited to 'api4/team.go')
-rw-r--r--api4/team.go15
1 files changed, 7 insertions, 8 deletions
diff --git a/api4/team.go b/api4/team.go
index 858579b4a..e897ea32b 100644
--- a/api4/team.go
+++ b/api4/team.go
@@ -10,7 +10,6 @@ import (
"strconv"
l4g "github.com/alecthomas/log4go"
- "github.com/mattermost/mattermost-server/app"
"github.com/mattermost/mattermost-server/model"
"github.com/mattermost/mattermost-server/utils"
)
@@ -92,7 +91,7 @@ func getTeam(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
- app.SanitizeTeam(c.Session, team)
+ c.App.SanitizeTeam(c.Session, team)
w.Write([]byte(team.ToJson()))
return
@@ -114,7 +113,7 @@ func getTeamByName(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
- app.SanitizeTeam(c.Session, team)
+ c.App.SanitizeTeam(c.Session, team)
w.Write([]byte(team.ToJson()))
return
@@ -148,7 +147,7 @@ func updateTeam(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
- app.SanitizeTeam(c.Session, updatedTeam)
+ c.App.SanitizeTeam(c.Session, updatedTeam)
w.Write([]byte(updatedTeam.ToJson()))
}
@@ -178,7 +177,7 @@ func patchTeam(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
- app.SanitizeTeam(c.Session, patchedTeam)
+ c.App.SanitizeTeam(c.Session, patchedTeam)
c.LogAudit("")
w.Write([]byte(patchedTeam.ToJson()))
@@ -225,7 +224,7 @@ func getTeamsForUser(c *Context, w http.ResponseWriter, r *http.Request) {
c.Err = err
return
} else {
- app.SanitizeTeams(c.Session, teams)
+ c.App.SanitizeTeams(c.Session, teams)
w.Write([]byte(model.TeamListToJson(teams)))
}
@@ -553,7 +552,7 @@ func getAllTeams(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
- app.SanitizeTeams(c.Session, teams)
+ c.App.SanitizeTeams(c.Session, teams)
w.Write([]byte(model.TeamListToJson(teams)))
}
@@ -584,7 +583,7 @@ func searchTeams(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
- app.SanitizeTeams(c.Session, teams)
+ c.App.SanitizeTeams(c.Session, teams)
w.Write([]byte(model.TeamListToJson(teams)))
}