Skip to content

Commit

Permalink
Update main.rs
Browse files Browse the repository at this point in the history
update Path for version 0.8
  • Loading branch information
ArvinTaghizadeh authored Jan 24, 2025
1 parent 8a49cbb commit d69034e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rust/axum/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ async fn main() {
let router: Router = Router::new()
.route("/", get(|| async {}))
.route("/user", post(|| async {}))
.route("/user/:id", get(|Path(id): Path<String>| async move { id }));
.route("/user/{id}", get(|Path(id): Path<String>| async move { id }));

let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await.unwrap();
axum::serve(listener, router.into_make_service())
Expand Down

0 comments on commit d69034e

Please sign in to comment.