diff --git a/clash_lib/src/app/api/handlers/connection.rs b/clash_lib/src/app/api/handlers/connection.rs index 3ec4c0f2..c0a1ebb4 100644 --- a/clash_lib/src/app/api/handlers/connection.rs +++ b/clash_lib/src/app/api/handlers/connection.rs @@ -26,7 +26,7 @@ struct ConnectionState { pub fn routes(statistics_manager: Arc) -> Router> { Router::new() .route("/", get(get_connections).delete(close_all_connection)) - .route("/:id", delete(close_connection)) + .route("/{id}", delete(close_connection)) .with_state(ConnectionState { statistics_manager }) } diff --git a/clash_lib/src/app/api/handlers/provider.rs b/clash_lib/src/app/api/handlers/provider.rs index 29166969..99ae23c6 100644 --- a/clash_lib/src/app/api/handlers/provider.rs +++ b/clash_lib/src/app/api/handlers/provider.rs @@ -27,12 +27,12 @@ pub fn routes(outbound_manager: ThreadSafeOutboundManager) -> Router