MM-47420 - Add endpoint to fetch selfhosted products (#21678)
* created selfhosted endpoint * make autogenerated mocks * add test * add user id * remove user id requirement * add tests * send user id with request Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
ed3f3fec46
Коммит
966456567d
@@ -8041,6 +8041,19 @@ func (c *Client4) GetCloudProducts() ([]*Product, *Response, error) {
|
||||
return cloudProducts, BuildResponse(r), nil
|
||||
}
|
||||
|
||||
func (c *Client4) GetSelfHostedProducts() ([]*Product, *Response, error) {
|
||||
r, err := c.DoAPIGet(c.cloudRoute()+"/products/selfhosted", "")
|
||||
if err != nil {
|
||||
return nil, BuildResponse(r), err
|
||||
}
|
||||
defer closeBody(r)
|
||||
|
||||
var products []*Product
|
||||
json.NewDecoder(r.Body).Decode(&products)
|
||||
|
||||
return products, BuildResponse(r), nil
|
||||
}
|
||||
|
||||
func (c *Client4) GetProductLimits() (*ProductLimits, *Response, error) {
|
||||
r, err := c.DoAPIGet(c.cloudRoute()+"/limits", "")
|
||||
if err != nil {
|
||||
|
||||
Ссылка в новой задаче
Block a user