Use 200 status code for healthcheck endpoint

This commit is contained in:
tamo 2021-03-16 11:17:54 +01:00
parent 5ca3382f5c
commit a2ac2de011
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,5 +9,5 @@ pub fn services(cfg: &mut web::ServiceConfig) {
#[get("/health")]
async fn get_health() -> Result<HttpResponse, ResponseError> {
Ok(HttpResponse::NoContent().finish())
Ok(HttpResponse::Ok().finish())
}

View File

@ -7,5 +7,5 @@ async fn test_healthyness() {
// Check that the server is healthy
let (_response, status_code) = server.get_health().await;
assert_eq!(status_code, 204);
assert_eq!(status_code, 200);
}