mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-23 10:37:41 +08:00
follow the IBM convention
This commit is contained in:
parent
f6d0689967
commit
018cadc598
@ -9,6 +9,6 @@ pub fn services(cfg: &mut web::ServiceConfig) {
|
|||||||
|
|
||||||
#[get("/health")]
|
#[get("/health")]
|
||||||
async fn get_health() -> Result<HttpResponse, ResponseError> {
|
async fn get_health() -> Result<HttpResponse, ResponseError> {
|
||||||
let payload = serde_json::json!({ "status": "ok" });
|
let payload = serde_json::json!({ "status": "available" });
|
||||||
Ok(HttpResponse::Ok().body(payload.to_string()))
|
Ok(HttpResponse::Ok().body(payload.to_string()))
|
||||||
}
|
}
|
||||||
|
@ -8,5 +8,5 @@ async fn test_healthyness() {
|
|||||||
|
|
||||||
let (response, status_code) = server.get_health().await;
|
let (response, status_code) = server.get_health().await;
|
||||||
assert_eq!(status_code, 200);
|
assert_eq!(status_code, 200);
|
||||||
assert_eq!(response["status"], "ok");
|
assert_eq!(response["status"], "available");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user