mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 03:47:02 +02: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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue