http_private: change url format to /announce/:user_token/

This commit is contained in:
Joakim Frostegård 2022-04-03 00:53:14 +02:00
parent c424ffb077
commit 4154cc3c2a
2 changed files with 2 additions and 2 deletions

View file

@ -47,4 +47,4 @@ Run application:
cargo run -p aquatic_http_private
```
Test by visiting `localhost:3000/abcd/announce/?info_hash=abcdeabcdeabcdeabcde&peer_id=abcdeabcdeabcdeabcde&port=1000&left=0`
Test by visiting `localhost:3000/announce/abcd/?info_hash=abcdeabcdeabcdeabcde&peer_id=abcdeabcdeabcdeabcde&port=1000&left=0`

View file

@ -41,7 +41,7 @@ async fn run_app(
.await?;
let app = Router::new()
.route("/:user_token/announce/", get(routes::announce))
.route("/announce/:user_token/", get(routes::announce))
.layer(Extension(Arc::new(config)))
.layer(Extension(pool))
.layer(Extension(Arc::new(request_sender)));