mattermost/api4/plugin_local.go
Miguel de la Cruz 10d2fed795
[MM-27022] Add marketplace endpoints to local mode (#15053)
* [MM-27022] Add marketplace endpoints to local mode

* Fix test

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-08-19 13:54:46 +02:00

15 lines
878 B
Go

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
package api4
func (api *API) InitPluginLocal() {
api.BaseRoutes.Plugins.Handle("", api.ApiLocal(uploadPlugin)).Methods("POST")
api.BaseRoutes.Plugins.Handle("", api.ApiLocal(getPlugins)).Methods("GET")
api.BaseRoutes.Plugins.Handle("/install_from_url", api.ApiLocal(installPluginFromUrl)).Methods("POST")
api.BaseRoutes.Plugin.Handle("", api.ApiLocal(removePlugin)).Methods("DELETE")
api.BaseRoutes.Plugin.Handle("/enable", api.ApiLocal(enablePlugin)).Methods("POST")
api.BaseRoutes.Plugin.Handle("/disable", api.ApiLocal(disablePlugin)).Methods("POST")
api.BaseRoutes.Plugins.Handle("/marketplace", api.ApiLocal(installMarketplacePlugin)).Methods("POST")
api.BaseRoutes.Plugins.Handle("/marketplace", api.ApiLocal(getMarketplacePlugins)).Methods("GET")
}