Fix example path params
Resolves the following error:
thread 'main' (6023907) panicked at examples/live_federation/main.rs:58:10:
Path segments must not start with `:`. For capture groups, use `{capture}`. If you meant to literally match a segment starting with a colon, call `without_v07_checks` on the router.
This commit is contained in:
parent
8b2b746707
commit
5625f349e3
1 changed files with 2 additions and 2 deletions
|
|
@ -55,8 +55,8 @@ async fn main() -> Result<(), Error> {
|
|||
info!("Listen with HTTP server on {BIND_ADDRESS}");
|
||||
let config = config.clone();
|
||||
let app = Router::new()
|
||||
.route("/:user", get(http_get_user))
|
||||
.route("/:user/inbox", post(http_post_user_inbox))
|
||||
.route("/{user}", get(http_get_user))
|
||||
.route("/{user}/inbox", post(http_post_user_inbox))
|
||||
.route("/.well-known/webfinger", get(webfinger))
|
||||
.layer(FederationMiddleware::new(config));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue