diff --git a/rust/salvo/Cargo.toml b/rust/salvo/Cargo.toml index cb24c7e7b1f..5f264cb463d 100644 --- a/rust/salvo/Cargo.toml +++ b/rust/salvo/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" authors = ["Chrislearn Young "] [dependencies] -salvo = { version = "0.75", default-features = false, features = ["server", "http1"]} +salvo = { version = "0.76", default-features = false, features = ["server", "http1"]} tokio = { version = "1", features = ["full"] } [profile.release] diff --git a/rust/salvo/config.yaml b/rust/salvo/config.yaml index b5b0e51b43b..11a907646f9 100644 --- a/rust/salvo/config.yaml +++ b/rust/salvo/config.yaml @@ -1,3 +1,3 @@ framework: github: salvo-rs/salvo - version: 0.74 + version: 0.76 diff --git a/rust/salvo/src/main.rs b/rust/salvo/src/main.rs index 250e9f6884a..fa47f096c64 100644 --- a/rust/salvo/src/main.rs +++ b/rust/salvo/src/main.rs @@ -14,7 +14,7 @@ async fn main() { let router = Router::new().get(index).push( Router::with_path("user") .post(index) - .push(Router::with_path("").filter(get()).goal(get_user)), + .push(Router::with_path("{id}").filter(get()).goal(get_user)), ); let acceptor = TcpListener::new("0.0.0.0:3000").bind().await; Server::new(acceptor).serve(router).await