follow the IBM convention

This commit is contained in:
tamo 2021-03-16 14:02:14 +01:00
parent f6d0689967
commit 018cadc598
No known key found for this signature in database
GPG Key ID: 7A6A970C96104F1B
2 changed files with 2 additions and 2 deletions

View File

@ -9,6 +9,6 @@ pub fn services(cfg: &mut web::ServiceConfig) {
#[get("/health")]
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()))
}

View File

@ -8,5 +8,5 @@ async fn test_healthyness() {
let (response, status_code) = server.get_health().await;
assert_eq!(status_code, 200);
assert_eq!(response["status"], "ok");
assert_eq!(response["status"], "available");
}