summaryrefslogtreecommitdiffstats
path: root/api4/plugin.go
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2018-07-10 15:01:43 -0400
committerJoramWilander <jwawilander@gmail.com>2018-07-10 15:01:43 -0400
commit6c7dc2d29ccac5f9925402f6be1a4c2a3c46c005 (patch)
tree5564a47257bf6e85aaef711980c5b0fcb4d07dcc /api4/plugin.go
parentc042ffa460296587579aff54b157a5109e022f7e (diff)
parent1e1a5e5e85240f25c4faddcb24c5a29a915fe6e4 (diff)
downloadchat-6c7dc2d29ccac5f9925402f6be1a4c2a3c46c005.tar.gz
chat-6c7dc2d29ccac5f9925402f6be1a4c2a3c46c005.tar.bz2
chat-6c7dc2d29ccac5f9925402f6be1a4c2a3c46c005.zip
Merge branch 'plugins-2'
Diffstat (limited to 'api4/plugin.go')
-rw-r--r--api4/plugin.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/api4/plugin.go b/api4/plugin.go
index ab026ab5f..90ea25b2d 100644
--- a/api4/plugin.go
+++ b/api4/plugin.go
@@ -24,11 +24,10 @@ func (api *API) InitPlugin() {
api.BaseRoutes.Plugin.Handle("", api.ApiSessionRequired(removePlugin)).Methods("DELETE")
api.BaseRoutes.Plugins.Handle("/statuses", api.ApiSessionRequired(getPluginStatuses)).Methods("GET")
- api.BaseRoutes.Plugin.Handle("/activate", api.ApiSessionRequired(activatePlugin)).Methods("POST")
- api.BaseRoutes.Plugin.Handle("/deactivate", api.ApiSessionRequired(deactivatePlugin)).Methods("POST")
+ api.BaseRoutes.Plugin.Handle("/enable", api.ApiSessionRequired(enablePlugin)).Methods("POST")
+ api.BaseRoutes.Plugin.Handle("/disable", api.ApiSessionRequired(disablePlugin)).Methods("POST")
api.BaseRoutes.Plugins.Handle("/webapp", api.ApiHandler(getWebappPlugins)).Methods("GET")
-
}
func uploadPlugin(c *Context, w http.ResponseWriter, r *http.Request) {
@@ -165,7 +164,7 @@ func getWebappPlugins(c *Context, w http.ResponseWriter, r *http.Request) {
w.Write([]byte(model.ManifestListToJson(clientManifests)))
}
-func activatePlugin(c *Context, w http.ResponseWriter, r *http.Request) {
+func enablePlugin(c *Context, w http.ResponseWriter, r *http.Request) {
c.RequirePluginId()
if c.Err != nil {
return
@@ -189,7 +188,7 @@ func activatePlugin(c *Context, w http.ResponseWriter, r *http.Request) {
ReturnStatusOK(w)
}
-func deactivatePlugin(c *Context, w http.ResponseWriter, r *http.Request) {
+func disablePlugin(c *Context, w http.ResponseWriter, r *http.Request) {
c.RequirePluginId()
if c.Err != nil {
return