return a 200 on health check

This commit is contained in:
tamo 2021-03-16 17:42:01 +01:00
parent 764ced8b5c
commit a268d0e283
No known key found for this signature in database
GPG key ID: 7A6A970C96104F1B
2 changed files with 11 additions and 1 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::NoContent().finish())
let payload = serde_json::json!({ "status": "available" });
Ok(HttpResponse::Ok().body(payload.to_string()))
}