From 7e3b94261a887ffa27c74484206290613ca854de Mon Sep 17 00:00:00 2001 From: Jeremy Wall Date: Tue, 1 Nov 2022 19:28:39 -0400 Subject: [PATCH] Slightly better routing on the server side --- kitchen/src/web/mod.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/kitchen/src/web/mod.rs b/kitchen/src/web/mod.rs index a1b8fdc..942f117 100644 --- a/kitchen/src/web/mod.rs +++ b/kitchen/src/web/mod.rs @@ -70,16 +70,7 @@ async fn ui_static_assets(Path(path): Path) -> impl IntoResponse { let mut path = path.trim_start_matches("/"); if UiAssets::get(path).is_none() { - path = match path { - "" | "inventory" | "plan" | "cook" | "categories" | "login" => "index.html", - _ => { - if path.starts_with("recipe") { - "index.html" - } else { - path - } - } - }; + path = "index.html"; } debug!(path = path, "Serving transformed path"); StaticFile(path.to_owned())