summaryrefslogtreecommitdiffstats
path: root/api4
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2018-01-05 16:17:57 -0600
committerGitHub <noreply@github.com>2018-01-05 16:17:57 -0600
commit591ef9f352efd98a85e6d04c0c9072c4c2987527 (patch)
tree2768aed148df1fba4a3e6d9c43057cf64199d6a1 /api4
parentfd3fa8f8dcfa5de42a16db9b62e1d6628f43b0fd (diff)
downloadchat-591ef9f352efd98a85e6d04c0c9072c4c2987527.tar.gz
chat-591ef9f352efd98a85e6d04c0c9072c4c2987527.tar.bz2
chat-591ef9f352efd98a85e6d04c0c9072c4c2987527.zip
Remove utils.ClientCfg and utils.ClientCfgHash (#8041)
* remove utils.ClientCfg and utils.ClientCfgHash * remove unused import
Diffstat (limited to 'api4')
-rw-r--r--api4/context.go2
-rw-r--r--api4/system.go2
-rw-r--r--api4/team_test.go2
3 files changed, 3 insertions, 3 deletions
diff --git a/api4/context.go b/api4/context.go
index 832b12414..6c46d1e4e 100644
--- a/api4/context.go
+++ b/api4/context.go
@@ -136,7 +136,7 @@ func (h handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
c.SetSiteURLHeader(app.GetProtocol(r) + "://" + r.Host)
w.Header().Set(model.HEADER_REQUEST_ID, c.RequestId)
- w.Header().Set(model.HEADER_VERSION_ID, fmt.Sprintf("%v.%v.%v.%v", model.CurrentVersion, model.BuildNumber, utils.ClientCfgHash, utils.IsLicensed()))
+ w.Header().Set(model.HEADER_VERSION_ID, fmt.Sprintf("%v.%v.%v.%v", model.CurrentVersion, model.BuildNumber, c.App.ClientConfigHash(), utils.IsLicensed()))
w.Header().Set("Content-Type", "application/json")
diff --git a/api4/system.go b/api4/system.go
index c87527ff0..43b941247 100644
--- a/api4/system.go
+++ b/api4/system.go
@@ -244,7 +244,7 @@ func getClientConfig(c *Context, w http.ResponseWriter, r *http.Request) {
}
respCfg := map[string]string{}
- for k, v := range utils.ClientCfg {
+ for k, v := range c.App.ClientConfig() {
respCfg[k] = v
}
diff --git a/api4/team_test.go b/api4/team_test.go
index c26c34a22..b5c036755 100644
--- a/api4/team_test.go
+++ b/api4/team_test.go
@@ -1897,7 +1897,7 @@ func TestInviteUsersToTeam(t *testing.T) {
expectedSubject := utils.T("api.templates.invite_subject",
map[string]interface{}{"SenderName": th.SystemAdminUser.GetDisplayName(nameFormat),
"TeamDisplayName": th.BasicTeam.DisplayName,
- "SiteName": utils.ClientCfg["SiteName"]})
+ "SiteName": th.App.ClientConfig()["SiteName"]})
//Check if the email was send to the rigth email address
for _, email := range emailList {