[MM-48542] Removing integration limits (#21282)

* Removing integration limits

* Remove freemium limit test

* Remove test assertion regarding cloud limits

* Remove GetIntegrationsUsage

* Removing integrations usage notifications

* This shouldn't be removed

* Removing client call and websocket event

* Remove old translations

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Javier Aguirre
2022-11-23 10:42:23 +01:00
коммит произвёл GitHub
родитель 0509e78744
Коммит 7f419ea091
28 изменённых файлов: 1 добавлений и 559 удалений

Просмотреть файл

@@ -18,8 +18,6 @@ func (api *API) InitUsage() {
api.BaseRoutes.Usage.Handle("/storage", api.APISessionRequired(getStorageUsage)).Methods("GET")
// GET /api/v4/usage/teams
api.BaseRoutes.Usage.Handle("/teams", api.APISessionRequired(getTeamsUsage)).Methods("GET")
// GET /api/v4/usage/integrations
api.BaseRoutes.Usage.Handle("/integrations", api.APISessionRequired(getIntegrationsUsage)).Methods("GET")
}
func getPostsUsage(c *Context, w http.ResponseWriter, r *http.Request) {
@@ -74,30 +72,3 @@ func getTeamsUsage(c *Context, w http.ResponseWriter, r *http.Request) {
w.Write(json)
}
func getIntegrationsUsage(c *Context, w http.ResponseWriter, r *http.Request) {
if !*c.App.Config().PluginSettings.Enable {
json, err := json.Marshal(&model.IntegrationsUsage{})
if err != nil {
c.Err = model.NewAppError("Api4.getIntegrationsUsage", "api.marshal_error", nil, "", http.StatusInternalServerError).Wrap(err)
return
}
w.Write(json)
return
}
usage, appErr := c.App.GetIntegrationsUsage()
if appErr != nil {
c.Err = appErr
return
}
json, err := json.Marshal(usage)
if err != nil {
c.Err = model.NewAppError("Api4.getIntegrationsUsage", "api.marshal_error", nil, "", http.StatusInternalServerError).Wrap(err)
return
}
w.Write(json)
}