diff --git a/crates/ptth_relay/src/scraper_api.rs b/crates/ptth_relay/src/scraper_api.rs index 7c24b68..004118c 100644 --- a/crates/ptth_relay/src/scraper_api.rs +++ b/crates/ptth_relay/src/scraper_api.rs @@ -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)?) }