From dcf9e96a0b16530549168a7891ed8242663b5f28 Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 22 Sep 2017 12:54:27 -0500 Subject: remove global refs from api/api4 (#7496) --- api/license.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'api/license.go') diff --git a/api/license.go b/api/license.go index e9ba85e59..18d6a20a3 100644 --- a/api/license.go +++ b/api/license.go @@ -14,12 +14,12 @@ import ( "github.com/mattermost/mattermost-server/utils" ) -func InitLicense() { +func (api *API) InitLicense() { l4g.Debug(utils.T("api.license.init.debug")) - BaseRoutes.License.Handle("/add", ApiAdminSystemRequired(addLicense)).Methods("POST") - BaseRoutes.License.Handle("/remove", ApiAdminSystemRequired(removeLicense)).Methods("POST") - BaseRoutes.License.Handle("/client_config", ApiAppHandler(getClientLicenceConfig)).Methods("GET") + api.BaseRoutes.License.Handle("/add", api.ApiAdminSystemRequired(addLicense)).Methods("POST") + api.BaseRoutes.License.Handle("/remove", api.ApiAdminSystemRequired(removeLicense)).Methods("POST") + api.BaseRoutes.License.Handle("/client_config", api.ApiAppHandler(getClientLicenceConfig)).Methods("GET") } func addLicense(c *Context, w http.ResponseWriter, r *http.Request) { @@ -88,7 +88,7 @@ func getClientLicenceConfig(c *Context, w http.ResponseWriter, r *http.Request) useSanitizedLicense := !app.SessionHasPermissionTo(c.Session, model.PERMISSION_MANAGE_SYSTEM) etag := utils.GetClientLicenseEtag(useSanitizedLicense) - if HandleEtag(etag, "Get Client License Config", w, r) { + if c.HandleEtag(etag, "Get Client License Config", w, r) { return } -- cgit v1.2.3-1-g7c22