fix(server): fix axum groups

This commit is contained in:
perf3ct 2025-07-04 03:07:28 +00:00
parent 0b0ffd1dbf
commit a19b6fb60b
No known key found for this signature in database
GPG Key ID: 569C4EEC436F5232
2 changed files with 20 additions and 20 deletions

View File

@ -22,16 +22,16 @@ pub fn router() -> Router<Arc<AppState>> {
// CRUD operations
.route("/", post(upload_document))
.route("/", get(list_documents))
.route("/:id", get(get_document_by_id))
.route("/:id", delete(delete_document))
.route("/:id/download", get(download_document))
.route("/:id/view", get(view_document))
.route("/{id}", get(get_document_by_id))
.route("/{id}", delete(delete_document))
.route("/{id}/download", get(download_document))
.route("/{id}/view", get(view_document))
// OCR operations
.route("/:id/ocr", get(get_document_ocr))
.route("/:id/ocr/retry", post(retry_ocr))
.route("/{id}/ocr", get(get_document_ocr))
.route("/{id}/ocr/retry", post(retry_ocr))
.route("/ocr/stats", get(get_ocr_stats))
.route("/:id/ocr/stop", post(cancel_ocr))
.route("/{id}/ocr/stop", post(cancel_ocr))
// Bulk operations
.route("/bulk/delete", post(bulk_delete_documents))
@ -39,14 +39,14 @@ pub fn router() -> Router<Arc<AppState>> {
.route("/cleanup/failed-ocr", delete(delete_failed_ocr_documents))
// Debug operations
.route("/:id/debug", get(get_document_debug_info))
.route("/:id/thumbnail", get(get_document_thumbnail))
.route("/:id/processed", get(get_processed_image))
.route("/:id/validate", get(validate_document_integrity))
.route("/{id}/debug", get(get_document_debug_info))
.route("/{id}/thumbnail", get(get_document_thumbnail))
.route("/{id}/processed", get(get_processed_image))
.route("/{id}/validate", get(validate_document_integrity))
.route("/duplicates", get(get_user_duplicates))
// Failed documents
.route("/failed", get(get_failed_documents))
.route("/failed/:id", get(view_failed_document))
.route("/failed/{id}", get(view_failed_document))
.route("/failed/ocr", get(get_failed_ocr_documents))
}

View File

@ -18,20 +18,20 @@ pub fn router() -> Router<Arc<AppState>> {
// CRUD operations
.route("/", get(list_sources))
.route("/", post(create_source))
.route("/:id", get(get_source))
.route("/:id", put(update_source))
.route("/:id", delete(delete_source))
.route("/{id}", get(get_source))
.route("/{id}", put(update_source))
.route("/{id}", delete(delete_source))
// Sync operations
.route("/:id/sync", post(trigger_sync))
.route("/:id/sync/stop", post(stop_sync))
.route("/:id/deep-scan", post(trigger_deep_scan))
.route("/{id}/sync", post(trigger_sync))
.route("/{id}/sync/stop", post(stop_sync))
.route("/{id}/deep-scan", post(trigger_deep_scan))
// Validation operations
.route("/:id/validate", post(validate_source))
.route("/{id}/validate", post(validate_source))
.route("/test", post(test_connection_with_config))
// Estimation operations
.route("/:id/estimate", get(estimate_crawl))
.route("/{id}/estimate", get(estimate_crawl))
.route("/estimate", post(estimate_crawl_with_config))
}