mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-24 23:31:02 +00:00
use json instead of body when crafting the request
This commit is contained in:
@ -9,6 +9,5 @@ pub fn services(cfg: &mut web::ServiceConfig) {
|
||||
|
||||
#[get("/health")]
|
||||
async fn get_health() -> Result<HttpResponse, ResponseError> {
|
||||
let payload = serde_json::json!({ "status": "available" });
|
||||
Ok(HttpResponse::Ok().body(payload.to_string()))
|
||||
Ok(HttpResponse::Ok().json(serde_json::json!({ "status": "available" })))
|
||||
}
|
||||
|
Reference in New Issue
Block a user