Fix duplicate route panic: Remove conflicting '/' route

This commit is contained in:
Warren
2026-06-19 09:20:20 +08:00
parent 00824df4ae
commit a235be312f

View File

@@ -234,7 +234,6 @@ pub async fn run(port: u16, file: Option<String>) -> anyhow::Result<()> {
.route("/files", get(|| async { Html(include_str!("file_list.html")) })) .route("/files", get(|| async { Html(include_str!("file_list.html")) }))
.route("/products", get(|| async { Html(include_str!("product_manager.html")) })) .route("/products", get(|| async { Html(include_str!("product_manager.html")) }))
.route("/downloads", get(|| async { Html(include_str!("category_view.html")) })) .route("/downloads", get(|| async { Html(include_str!("category_view.html")) }))
.route("/", get(|| async { Html(include_str!("category_view.html")) }))
.layer(DefaultBodyLimit::disable()) .layer(DefaultBodyLimit::disable())
.with_state(state); .with_state(state);