From 995fd6352eef1f9efdafda902b1a2430e8f65a93 Mon Sep 17 00:00:00 2001 From: Denis Arh Date: Wed, 4 Dec 2019 19:18:48 +0100 Subject: [PATCH] Codegen on old spec-change --- api/system/spec/stats.json | 11 +---------- docs/system/README.md | 1 - system/rest/request/stats.go | 9 --------- 3 files changed, 1 insertion(+), 20 deletions(-) diff --git a/api/system/spec/stats.json b/api/system/spec/stats.json index 58a05f05b..bb5b64078 100644 --- a/api/system/spec/stats.json +++ b/api/system/spec/stats.json @@ -15,16 +15,7 @@ "Method": "GET", "Title": "List system statistics", "Path": "/", - "Parameters": { - "get": [ - { - "name": "metrics", - "required": false, - "title": "Get only specified metrics", - "type": "[]string" - } - ] - } + "Parameters": {} } ] } \ No newline at end of file diff --git a/docs/system/README.md b/docs/system/README.md index ecf54c1d3..686ed6f19 100644 --- a/docs/system/README.md +++ b/docs/system/README.md @@ -1151,7 +1151,6 @@ An organisation may have many roles. Roles may have many channels available. Acc | Parameter | Type | Method | Description | Default | Required? | | --------- | ---- | ------ | ----------- | ------- | --------- | -| metrics | []string | GET | Get only specified metrics | N/A | NO | --- diff --git a/system/rest/request/stats.go b/system/rest/request/stats.go index 04189882c..03a8696b9 100644 --- a/system/rest/request/stats.go +++ b/system/rest/request/stats.go @@ -32,7 +32,6 @@ var _ = multipart.FileHeader{} // Stats list request parameters type StatsList struct { - Metrics []string } func NewStatsList() *StatsList { @@ -42,8 +41,6 @@ func NewStatsList() *StatsList { func (r StatsList) Auditable() map[string]interface{} { var out = map[string]interface{}{} - out["metrics"] = r.Metrics - return out } @@ -74,12 +71,6 @@ func (r *StatsList) Fill(req *http.Request) (err error) { post[name] = string(param[0]) } - if val, ok := urlQuery["metrics[]"]; ok { - r.Metrics = parseStrings(val) - } else if val, ok = urlQuery["metrics"]; ok { - r.Metrics = parseStrings(val) - } - return err }