Compare commits

..

1 commit

Author SHA1 Message Date
f81c2333f1 admin api: new router_v2 with unified path syntax
Some checks failed
ci/woodpecker/pr/debug Pipeline failed
ci/woodpecker/push/debug Pipeline failed
2025-01-28 15:16:37 +01:00

View file

@ -6,6 +6,7 @@ use http::header::{ACCESS_CONTROL_ALLOW_METHODS, ACCESS_CONTROL_ALLOW_ORIGIN, AL
use hyper::{Response, StatusCode};
use garage_model::garage::Garage;
use garage_rpc::system::ClusterHealthStatus;
use crate::admin::api::{CheckDomainRequest, HealthRequest, OptionsRequest};
use crate::admin::api_server::ResBody;
@ -17,7 +18,7 @@ use crate::helpers::*;
impl EndpointHandler for OptionsRequest {
type Response = Response<ResBody>;
async fn handle(self, garage: &Arc<Garage>) -> Result<Response<ResBody>, Error> {
async fn handle(self, _garage: &Arc<Garage>) -> Result<Response<ResBody>, Error> {
Ok(Response::builder()
.status(StatusCode::NO_CONTENT)
.header(ALLOW, "OPTIONS, GET, POST")
@ -116,7 +117,7 @@ impl EndpointHandler for HealthRequest {
),
};
let status_str = format!(
"{}\nConsult the full health check API endpoint at /v1/health for more details\n",
"{}\nConsult the full health check API endpoint at /v2/GetClusterHealth for more details\n",
status_str
);