3
0

Codegen on old spec-change

This commit is contained in:
Denis Arh
2019-12-04 19:18:48 +01:00
parent f763dc26fc
commit 995fd6352e
3 changed files with 1 additions and 20 deletions

View File

@@ -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": {}
}
]
}

View File

@@ -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 |
---

View File

@@ -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
}