Skip to content

Commit 6f74d7b

Browse files
committed
Fix startup crash due to axum 0.8 changing path match syntax
1 parent 7af8c97 commit 6f74d7b

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Bugfixes
11+
12+
- Fix crash on startup due to path matching syntax changing in axum 0.8
13+
1014
### Internal Changes
1115

1216
- Rewrite `bobashare_web::str_to_duration` to not use regex

bobashare-web/src/api/v1/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ pub mod upload;
2525
/// - `/api/v1/delete/:id`: [`delete::delete`]
2626
pub fn router() -> Router<&'static AppState> {
2727
Router::new()
28-
.route("/info/:id", get(info::info))
29-
.route("/upload/:filename", put(upload::put))
30-
.route("/delete/:id", delete(delete::delete))
28+
.route("/info/{id}", get(info::info))
29+
.route("/upload/{filename}", put(upload::put))
30+
.route("/delete/{id}", delete(delete::delete))
3131
}
3232

3333
/// Method to convert an [`std::error::Error`] into a [`Response`] with a

bobashare-web/src/views/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,6 @@ pub fn router() -> Router<&'static AppState> {
146146
.route("/", get(upload::upload))
147147
.route("/paste/", get(upload::paste))
148148
.route("/about/", get(about::about))
149-
.route("/:id", get(display::display))
150-
.route("/raw/:id", get(display::raw))
149+
.route("/{id}", get(display::display))
150+
.route("/raw/{id}", get(display::raw))
151151
}

0 commit comments

Comments
 (0)