From d4b1331a0ae4b485c467bb09e11b537ca7f6fff3 Mon Sep 17 00:00:00 2001 From: Irevoire Date: Thu, 18 Mar 2021 11:54:10 +0100 Subject: [PATCH] use the json method instead of the body method in the creation of the response --- meilisearch-http/src/routes/health.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meilisearch-http/src/routes/health.rs b/meilisearch-http/src/routes/health.rs index 053790d61..8d42b79bc 100644 --- a/meilisearch-http/src/routes/health.rs +++ b/meilisearch-http/src/routes/health.rs @@ -10,5 +10,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(payload)) }