Skip to content

Commit

Permalink
axum new uri format (#667)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibigbug authored Jan 8, 2025
1 parent 35868bd commit 8de5c14
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion clash_lib/src/app/api/handlers/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ struct ConnectionState {
pub fn routes(statistics_manager: Arc<StatisticsManager>) -> Router<Arc<AppState>> {
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 })
}

Expand Down
4 changes: 2 additions & 2 deletions clash_lib/src/app/api/handlers/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ pub fn routes(outbound_manager: ThreadSafeOutboundManager) -> Router<Arc<AppStat
Router::new()
.route("/", get(get_providers))
.nest(
"/:provider_name",
"/{provider_name}",
Router::new()
.route("/", get(get_provider).put(update_provider))
.route("/healthcheck", get(provider_healthcheck))
.nest(
"/:proxy_name",
"/{proxy_name}",
Router::new()
.route("/", get(get_proxy))
.route("/healthcheck", get(get_proxy_delay))
Expand Down
2 changes: 1 addition & 1 deletion clash_lib/src/app/api/handlers/proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub fn routes(
Router::new()
.route("/", get(get_proxies))
.nest(
"/:name",
"/{name}",
Router::new()
.route("/", get(get_proxy).put(update_proxy))
.route("/delay", get(get_proxy_delay))
Expand Down

0 comments on commit 8de5c14

Please sign in to comment.