From 918712c33666d2f24abeca10dddde82824733a7a Mon Sep 17 00:00:00 2001 From: max-lt Date: Mon, 25 Mar 2024 10:42:53 +0100 Subject: [PATCH] Remove health fn --- bin/main.rs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/bin/main.rs b/bin/main.rs index 4d44e97..1e7fb28 100644 --- a/bin/main.rs +++ b/bin/main.rs @@ -180,16 +180,6 @@ async fn handle_request(data: Data, req: HttpRequest, body: Bytes) -> response } -async fn health_check(req: HttpRequest) -> HttpResponse { - debug!( - "health_check of: {:?} {}", - req.connection_info(), - req.method() - ); - - HttpResponse::Ok().body("ok") -} - #[actix_web::main] async fn main() -> std::io::Result<()> { dotenv::dotenv().ok(); @@ -247,8 +237,8 @@ async fn main() -> std::io::Result<()> { .service( web::resource("/health") .guard(actix_web::guard::Header("host", "127.0.0.1:8080")) - .route(web::head().to(health_check)) - .route(web::get().to(health_check)), + .route(web::head().to(HttpResponse::Ok)) + .route(web::get().to(HttpResponse::Ok)), ) .default_service(web::to(handle_request)) })