Update to axum 0.8

This commit is contained in:
2025-01-04 14:22:32 +01:00
parent 27b814f708
commit 238297e89e
3 changed files with 52 additions and 110 deletions

View File

@@ -108,8 +108,11 @@ pub async fn get_router() -> Router {
let (prometheus_layer, metric_handle) = PrometheusMetricLayer::pair();
let app_router = Router::new()
.route("/download/:source_id/:remote_id/:file_type", get(download))
.route("/filename/:book_id/:file_type", get(get_filename))
.route(
"/download/{source_id}/{remote_id}/{file_type}",
get(download),
)
.route("/filename/{book_id}/{file_type}", get(get_filename))
.layer(middleware::from_fn(auth))
.layer(prometheus_layer);