From 233c1e304dbf42dded214120dc4125ba8e01dc5c Mon Sep 17 00:00:00 2001 From: tamo Date: Tue, 16 Mar 2021 17:45:59 +0100 Subject: [PATCH] use json instead of body when crafting the request --- meilisearch-http/src/routes/health.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/meilisearch-http/src/routes/health.rs b/meilisearch-http/src/routes/health.rs index 053790d61..8994df722 100644 --- a/meilisearch-http/src/routes/health.rs +++ b/meilisearch-http/src/routes/health.rs @@ -9,6 +9,5 @@ pub fn services(cfg: &mut web::ServiceConfig) { #[get("/health")] async fn get_health() -> Result { - let payload = serde_json::json!({ "status": "available" }); - Ok(HttpResponse::Ok().body(payload.to_string())) + Ok(HttpResponse::Ok().json(serde_json::json!({ "status": "available" }))) }