From 22aad6ed77566690cba56c74bca9caa63ae7a13c Mon Sep 17 00:00:00 2001 From: Valentin Brandl Date: Sat, 12 Sep 2020 14:13:19 +0200 Subject: [PATCH] Fix breaking changes --- src/main.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index 1ca0d94..b90a9ce 100644 --- a/src/main.rs +++ b/src/main.rs @@ -394,12 +394,10 @@ async fn async_p404() -> Result { p404() } -#[get("/tacit-css.min.css")] fn css() -> HttpResponse { HttpResponse::Ok().content_type("text/css").body(CSS) } -#[get("/favicon.ico")] fn favicon32() -> HttpResponse { HttpResponse::Ok().content_type("image/png").body(FAVICON) } @@ -414,10 +412,11 @@ async fn start_server() -> std::io::Result<()> { App::new() .data(state.clone()) .wrap(middleware::Logger::default()) - .wrap(middleware::NormalizePath::default()) + // .wrap(middleware::NormalizePath::default()) .service(index) - .service(css) - .service(favicon32) + .service(web::resource("/tacit-css.min.css").route(web::get().to(css))) + // TODO + .service(web::resource("/favicon.ico").route(web::get().to(favicon32))) .service(generate) .service(web::resource("/github/{user}/{repo}").to(calculate_hoc::)) .service(web::resource("/gitlab/{user}/{repo}").to(calculate_hoc::))