Skip to content

Commit 1bda49e

Browse files
committed
Updated example routes to new Axum style
1 parent c4a28f9 commit 1bda49e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

examples/full/routes.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ use terracotta::{
2626
/// Returns a list of protected routes.
2727
pub fn protected() -> Vec<(&'static str, MethodRouter<Arc<AppState>>)> {
2828
vec![
29-
("/", get(get_index)),
30-
("/*path", get(get_protected_static_asset)),
29+
("/", get(get_index)),
30+
("/{*path}", get(get_protected_static_asset)),
3131
]
3232
}
3333

@@ -42,10 +42,10 @@ pub fn public() -> Vec<(&'static str, MethodRouter<Arc<AppState>>)> {
4242
("/api/stats/feed", get(get_stats_feed)),
4343
("/login", post(post_login::<_, Credentials, User, User>)),
4444
("/logout", get(get_logout::<User>)),
45-
("/css/*path", get(get_public_static_asset)),
46-
("/img/*path", get(get_public_static_asset)),
47-
("/js/*path", get(get_public_static_asset)),
48-
("/webfonts/*path", get(get_public_static_asset)),
45+
("/css/{*path}", get(get_public_static_asset)),
46+
("/img/{*path}", get(get_public_static_asset)),
47+
("/js/{*path}", get(get_public_static_asset)),
48+
("/webfonts/{*path}", get(get_public_static_asset)),
4949
]
5050
}
5151

0 commit comments

Comments
 (0)