summaryrefslogtreecommitdiffstats
path: root/web/api/exporters/allmetrics.c
diff options
context:
space:
mode:
Diffstat (limited to 'web/api/exporters/allmetrics.c')
-rw-r--r--web/api/exporters/allmetrics.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/web/api/exporters/allmetrics.c b/web/api/exporters/allmetrics.c
index 88ff78e7e..686a6cabc 100644
--- a/web/api/exporters/allmetrics.c
+++ b/web/api/exporters/allmetrics.c
@@ -75,12 +75,12 @@ inline int web_client_api_request_v1_allmetrics(RRDHOST *host, struct web_client
case ALLMETRICS_JSON:
w->response.data->contenttype = CT_APPLICATION_JSON;
rrd_stats_api_v1_charts_allmetrics_json(host, w->response.data);
- return 200;
+ return HTTP_RESP_OK;
case ALLMETRICS_SHELL:
w->response.data->contenttype = CT_TEXT_PLAIN;
rrd_stats_api_v1_charts_allmetrics_shell(host, w->response.data);
- return 200;
+ return HTTP_RESP_OK;
case ALLMETRICS_PROMETHEUS:
w->response.data->contenttype = CT_PROMETHEUS;
@@ -92,7 +92,7 @@ inline int web_client_api_request_v1_allmetrics(RRDHOST *host, struct web_client
, prometheus_backend_options
, prometheus_output_options
);
- return 200;
+ return HTTP_RESP_OK;
case ALLMETRICS_PROMETHEUS_ALL_HOSTS:
w->response.data->contenttype = CT_PROMETHEUS;
@@ -104,11 +104,11 @@ inline int web_client_api_request_v1_allmetrics(RRDHOST *host, struct web_client
, prometheus_backend_options
, prometheus_output_options
);
- return 200;
+ return HTTP_RESP_OK;
default:
w->response.data->contenttype = CT_TEXT_PLAIN;
buffer_strcat(w->response.data, "Which format? '" ALLMETRICS_FORMAT_SHELL "', '" ALLMETRICS_FORMAT_PROMETHEUS "', '" ALLMETRICS_FORMAT_PROMETHEUS_ALL_HOSTS "' and '" ALLMETRICS_FORMAT_JSON "' are currently supported.");
- return 400;
+ return HTTP_RESP_BAD_REQUEST;
}
}