mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
PLT-7622 Improvements to server handling of webapp plugins (#7445)
* Improvements to server handling of webapp plugins * Fix newline * Update manifest function names
This commit is contained in:
@@ -3088,3 +3088,14 @@ func (c *Client4) RemovePlugin(id string) (bool, *Response) {
|
||||
return CheckStatusOK(r), BuildResponse(r)
|
||||
}
|
||||
}
|
||||
|
||||
// GetWebappPlugins will return a list of plugins that the webapp should download.
|
||||
// WARNING: PLUGINS ARE STILL EXPERIMENTAL. THIS FUNCTION IS SUBJECT TO CHANGE.
|
||||
func (c *Client4) GetWebappPlugins() ([]*Manifest, *Response) {
|
||||
if r, err := c.DoApiGet(c.GetPluginsRoute()+"/webapp", ""); err != nil {
|
||||
return nil, BuildErrorResponse(r, err)
|
||||
} else {
|
||||
defer closeBody(r)
|
||||
return ManifestListFromJson(r.Body), BuildResponse(r)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user