mirror of
https://github.com/ClusterCockpit/cc-metric-store.git
synced 2025-07-28 07:36:09 +02:00
Return unit in API requests per default
This commit is contained in:
2
api.go
2
api.go
@@ -208,7 +208,7 @@ type ApiQuery struct {
|
||||
|
||||
func handleQuery(rw http.ResponseWriter, r *http.Request) {
|
||||
var err error
|
||||
var req ApiQueryRequest = ApiQueryRequest{WithStats: true, WithData: true, WithPadding: true}
|
||||
var req ApiQueryRequest = ApiQueryRequest{WithStats: true, WithData: true, WithPadding: true, WithUnit: true}
|
||||
if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
|
||||
http.Error(rw, err.Error(), http.StatusBadRequest)
|
||||
return
|
||||
|
Reference in New Issue
Block a user