Revert "Remove Download Center routes from server.rs (dead code cleanup)"
This reverts commit 20b208bb7f.
This commit is contained in:
@@ -260,6 +260,20 @@ pub async fn run(port: u16, file: Option<String>) -> anyhow::Result<()> {
|
||||
.route("/api/v2/metrics", get(metrics_handler))
|
||||
.route("/api/v2/audit", get(audit_handler))
|
||||
// Upload API endpoints (unlimited file upload)
|
||||
// Product API endpoints
|
||||
.route("/api/v2/products", get(crate::download::list_all_products))
|
||||
.route("/api/v2/products/stats", get(crate::download::get_series_stats))
|
||||
.route("/api/v2/products/create", post(crate::download::create_product_handler))
|
||||
.route("/api/v2/products/by-series/:series", get(crate::download::list_products_by_series))
|
||||
.route("/api/v2/products/:product_id", delete(crate::download::delete_product))
|
||||
.route("/api/v2/products/:product_id/files", get(crate::download::get_product_files))
|
||||
.route("/api/v2/products/:product_id/assign-files", post(crate::download::assign_files_to_product))
|
||||
.route("/api/v2/download/:file_id", get(crate::download::download_file))
|
||||
.route("/api/v2/download/:user_id/*file_path", get(crate::download::download_file_by_path))
|
||||
.route("/api/v2/download/products/:product_series/*file_path", get(crate::download::download_product_file))
|
||||
.route("/api/v2/download/stats", get(crate::download::get_download_stats))
|
||||
.route("/api/v2/files/:user_id", get(crate::download::list_uploaded_files))
|
||||
.route("/api/v2/files/:user_id/:filename", get(crate::download::get_file_info))
|
||||
.route("/api/v2/upload-unlimited/:user_id", post(upload_unlimited))
|
||||
// Category View API endpoints (Phase 1: 双视图管理)
|
||||
.route("/api/v2/categories", get(get_all_categories_handler))
|
||||
@@ -268,6 +282,9 @@ pub async fn run(port: u16, file: Option<String>) -> anyhow::Result<()> {
|
||||
.route("/api/v2/series/:series_name", get(get_series_detail_handler))
|
||||
.route("/api/v2/files/search", get(search_files_handler))
|
||||
.route("/api/v2/health", get(health_handler))
|
||||
.route("/upload", get(|| async { Html(include_str!("upload.html")) }))
|
||||
.route("/files", get(|| async { Html(include_str!("file_list.html")) }))
|
||||
.route("/products", get(|| async { Html(include_str!("product_manager.html")) }))
|
||||
.route("/downloads", get(|| async { Html(include_str!("category_view.html")) }))
|
||||
// WebDAV API endpoints (Phase 20, multi-user P1)
|
||||
.route("/webdav", any(handle_webdav_multi))
|
||||
|
||||
Reference in New Issue
Block a user