diff --git a/torii/src/routing.rs b/torii/src/routing.rs index d909c7faec6..960687ceaea 100644 --- a/torii/src/routing.rs +++ b/torii/src/routing.rs @@ -136,8 +136,8 @@ enum Health { Healthy, } -pub fn handle_health() -> Json { - reply::json(&Health::Healthy) +pub fn handle_health() -> &' static str{ + warp::reply::with_status("Healthy", StatusCode::OK) } #[iroha_futures::telemetry_future] @@ -305,7 +305,7 @@ pub mod subscription { #[iroha_futures::telemetry_future] #[cfg(feature = "telemetry")] -pub async fn handle_version(sumeragi: SumeragiHandle) -> Json { +pub async fn handle_version(sumeragi: SumeragiHandle) ->String{ use iroha_version::Version; let string = sumeragi @@ -313,7 +313,7 @@ pub async fn handle_version(sumeragi: SumeragiHandle) -> Json { .expect("Genesis not applied. Nothing we can do. Solve the issue and rerun.") .version() .to_string(); - reply::json(&string) + warp::reply::with_status(string, warp::http::StatusCode::OK) } #[cfg(feature = "telemetry")]