add a body to be fully compliant with the http spec

This commit is contained in:
tamo 2021-03-16 11:40:51 +01:00
parent a2ac2de011
commit f6d0689967
No known key found for this signature in database
GPG key ID: 7A6A970C96104F1B
2 changed files with 4 additions and 2 deletions

View file

@ -9,5 +9,6 @@ pub fn services(cfg: &mut web::ServiceConfig) {
#[get("/health")]
async fn get_health() -> Result<HttpResponse, ResponseError> {
Ok(HttpResponse::Ok().finish())
let payload = serde_json::json!({ "status": "ok" });
Ok(HttpResponse::Ok().body(payload.to_string()))
}