diff options
author | Chris <ccbrown112@gmail.com> | 2017-09-22 12:54:27 -0500 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2017-09-22 13:54:27 -0400 |
commit | dcf9e96a0b16530549168a7891ed8242663b5f28 (patch) | |
tree | 344255f0abbe1bd207e2f2ab864d245e240f4eeb /web/web.go | |
parent | e0d5703f721aafef1b55747cd09629860e86bfb4 (diff) | |
download | chat-dcf9e96a0b16530549168a7891ed8242663b5f28.tar.gz chat-dcf9e96a0b16530549168a7891ed8242663b5f28.tar.bz2 chat-dcf9e96a0b16530549168a7891ed8242663b5f28.zip |
remove global refs from api/api4 (#7496)
Diffstat (limited to 'web/web.go')
-rw-r--r-- | web/web.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/web/web.go b/web/web.go index 2f9e111bd..77a0c107a 100644 --- a/web/web.go +++ b/web/web.go @@ -11,16 +11,15 @@ import ( l4g "github.com/alecthomas/log4go" "github.com/mattermost/mattermost-server/api" - "github.com/mattermost/mattermost-server/app" "github.com/mattermost/mattermost-server/model" "github.com/mattermost/mattermost-server/utils" "github.com/mssola/user_agent" ) -func InitWeb() { +func Init(api3 *api.API) { l4g.Debug(utils.T("web.init.debug")) - mainrouter := app.Global().Srv.Router + mainrouter := api3.BaseRoutes.Root if *utils.Cfg.ServiceSettings.WebserverMode != "disabled" { staticDir, _ := utils.FindDir(model.CLIENT_DIR) @@ -36,7 +35,7 @@ func InitWeb() { mainrouter.PathPrefix("/static/plugins/").Handler(pluginHandler) mainrouter.PathPrefix("/static/").Handler(staticHandler) - mainrouter.Handle("/{anything:.*}", api.AppHandlerIndependent(root)).Methods("GET") + mainrouter.Handle("/{anything:.*}", api3.AppHandlerIndependent(root)).Methods("GET") } } |