mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-05 20:48:58 +01:00
use the json method instead of the body method in the creation of the response
This commit is contained in:
parent
018cadc598
commit
d4b1331a0a
@ -10,5 +10,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(payload))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user