Fix example path params (#153)

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:
Brad Dunbar 2025-11-21 04:03:20 -05:00 committed by GitHub
parent 99505b9567
commit 2acf037d79
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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));