From dd8d11c698435217c370b940b41d060a614892c1 Mon Sep 17 00:00:00 2001 From: boastful-squirrel Date: Thu, 2 May 2019 21:36:47 +0200 Subject: Read query params to handle error back link --- src/main.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 22b91cb..3bac14d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -287,6 +287,9 @@ fn error_404(req: &HttpRequest) -> Result "/".to_string(), }; + let (sort_method, sort_order, _, color_scheme, _) = listing::extract_query_parameters(req); + let color_scheme = color_scheme.unwrap_or(default_color_scheme); + errors::log_error_chain(err_404.to_string()); Ok(actix_web::HttpResponse::NotFound().body( @@ -294,11 +297,12 @@ fn error_404(req: &HttpRequest) -> Result