🐛 bug: move the metrics page behind auth

main
_ 2022-07-29 16:45:10 -05:00
parent 96fdf642c3
commit 70eb419fdc
1 changed files with 4 additions and 4 deletions

View File

@ -176,7 +176,10 @@ async fn api_v1 (
path: path_rest.to_string (),
})).await;
if path_rest == "test" {
if path_rest == "metrics" {
Ok (metrics (req, state).await?)
}
else if path_rest == "test" {
Ok (error_reply (StatusCode::OK, "You're valid!")?)
}
else if path_rest == "server_list" {
@ -241,9 +244,6 @@ pub async fn handle (
else if let Some (rest) = path_rest.strip_prefix ("api/") {
api_v1 (req, state, rest).await
}
else if path_rest == "metrics" {
metrics (req, state).await
}
else {
Ok (error_reply (StatusCode::NOT_FOUND, strings::UNKNOWN_API_VERSION)?)
}