fix: update Axum route parameters to use {id} syntax for Axum 0.8 compatibility

This commit is contained in:
2026-02-26 15:25:03 -05:00
parent f0435e4575
commit 888b0e71c4

View File

@@ -68,11 +68,11 @@ pub fn router(state: AppState) -> Router {
.route("/api/usage/clients", get(handle_clients_usage)) .route("/api/usage/clients", get(handle_clients_usage))
.route("/api/usage/providers", get(handle_providers_usage)) .route("/api/usage/providers", get(handle_providers_usage))
.route("/api/clients", get(handle_get_clients).post(handle_create_client)) .route("/api/clients", get(handle_get_clients).post(handle_create_client))
.route("/api/clients/:id", get(handle_get_client).delete(handle_delete_client)) .route("/api/clients/{id}", get(handle_get_client).delete(handle_delete_client))
.route("/api/clients/:id/usage", get(handle_client_usage)) .route("/api/clients/{id}/usage", get(handle_client_usage))
.route("/api/providers", get(handle_get_providers)) .route("/api/providers", get(handle_get_providers))
.route("/api/providers/:name", get(handle_get_provider).put(handle_update_provider)) .route("/api/providers/{name}", get(handle_get_provider).put(handle_update_provider))
.route("/api/providers/:name/test", post(handle_test_provider)) .route("/api/providers/{name}/test", post(handle_test_provider))
.route("/api/system/health", get(handle_system_health)) .route("/api/system/health", get(handle_system_health))
.route("/api/system/logs", get(handle_system_logs)) .route("/api/system/logs", get(handle_system_logs))
.route("/api/system/backup", post(handle_system_backup)) .route("/api/system/backup", post(handle_system_backup))