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 /api4/plugin.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 'api4/plugin.go')
-rw-r--r-- | api4/plugin.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/api4/plugin.go b/api4/plugin.go index ac1620335..08dea6301 100644 --- a/api4/plugin.go +++ b/api4/plugin.go @@ -18,14 +18,14 @@ const ( MAXIMUM_PLUGIN_FILE_SIZE = 50 * 1024 * 1024 ) -func InitPlugin() { +func (api *API) InitPlugin() { l4g.Debug("EXPERIMENTAL: Initializing plugin api") - BaseRoutes.Plugins.Handle("", ApiSessionRequired(uploadPlugin)).Methods("POST") - BaseRoutes.Plugins.Handle("", ApiSessionRequired(getPlugins)).Methods("GET") - BaseRoutes.Plugin.Handle("", ApiSessionRequired(removePlugin)).Methods("DELETE") + api.BaseRoutes.Plugins.Handle("", api.ApiSessionRequired(uploadPlugin)).Methods("POST") + api.BaseRoutes.Plugins.Handle("", api.ApiSessionRequired(getPlugins)).Methods("GET") + api.BaseRoutes.Plugin.Handle("", api.ApiSessionRequired(removePlugin)).Methods("DELETE") - BaseRoutes.Plugins.Handle("/webapp", ApiHandler(getWebappPlugins)).Methods("GET") + api.BaseRoutes.Plugins.Handle("/webapp", api.ApiHandler(getWebappPlugins)).Methods("GET") } |