Allow webapp to request legacy cloud products. (#18528)
* Change internal getProducts to filter on a set of families instead of a single family. * Extend /products endpoint to be able to return any of the current four sets of product families. * Use include_legacy query param to decide which cloud products to request.
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
d13b3604ea
Коммит
fbe4f75953
@@ -138,7 +138,10 @@ func getCloudProducts(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
products, err := c.App.Cloud().GetCloudProducts(c.AppContext.Session().UserId)
|
||||
includeLegacyProducts := r.URL.Query().Get("include_legacy") == "true"
|
||||
|
||||
products, err := c.App.Cloud().GetCloudProducts(c.AppContext.Session().UserId, includeLegacyProducts)
|
||||
|
||||
if err != nil {
|
||||
c.Err = model.NewAppError("Api4.getCloudProducts", "api.cloud.request_error", nil, err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
|
||||
Ссылка в новой задаче
Block a user