diff --git a/meilisearch-http/src/routes/health.rs b/meilisearch-http/src/routes/health.rs index c57e4c7e9..8d42b79bc 100644 --- a/meilisearch-http/src/routes/health.rs +++ b/meilisearch-http/src/routes/health.rs @@ -9,5 +9,6 @@ pub fn services(cfg: &mut web::ServiceConfig) { #[get("/health")] async fn get_health() -> Result { - Ok(HttpResponse::NoContent().finish()) + let payload = serde_json::json!({ "status": "available" }); + Ok(HttpResponse::Ok().json(payload)) } diff --git a/meilisearch-http/tests/health.rs b/meilisearch-http/tests/health.rs index f72127431..2be66887f 100644 --- a/meilisearch-http/tests/health.rs +++ b/meilisearch-http/tests/health.rs @@ -6,6 +6,7 @@ async fn test_healthyness() { // Check that the server is healthy - let (_response, status_code) = server.get_health().await; - assert_eq!(status_code, 204); + let (response, status_code) = server.get_health().await; + assert_eq!(status_code, 200); + assert_eq!(response["status"], "available"); }