Skip to content

Commit 6c691ae

Browse files
committed
Axum 0.7 syntax for routes
1 parent 6a98071 commit 6c691ae

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

crates/client-api/src/routes/database.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1488,7 +1488,7 @@ where
14881488
);
14891489

14901490
let authed_named_router = axum::Router::new()
1491-
.nest("/{name_or_identity}", db_router)
1491+
.nest("/:name_or_identity", db_router)
14921492
.route_layer(axum::middleware::from_fn_with_state(ctx, anon_auth_middleware::<S>));
14931493

14941494
// NOTE: HTTP route handlers are intentionally unauthenticated so they can accept
@@ -1497,9 +1497,9 @@ where
14971497
// Authorization headers do not trigger early rejection or attach SpacetimeAuth.
14981498
// Keep these routes merged separately from the authenticated database router.
14991499
let http_route_router = axum::Router::<S>::new()
1500-
.route("/{name_or_identity}/route", any(handle_http_route_root::<S>))
1501-
.route("/{name_or_identity}/route/", any(handle_http_route_root_slash::<S>))
1502-
.route("/{name_or_identity}/route/{*path}", any(handle_http_route::<S>));
1500+
.route("/:name_or_identity/route", any(handle_http_route_root::<S>))
1501+
.route("/:name_or_identity/route/", any(handle_http_route_root_slash::<S>))
1502+
.route("/:name_or_identity/route/*path", any(handle_http_route::<S>));
15031503

15041504
axum::Router::new()
15051505
.merge(authed_root_router)

0 commit comments

Comments
 (0)