Skip to content

Commit 5100106

Browse files
committed
Updated axum to 0.8 and fixed breaking changes
1 parent 9c8d8c8 commit 5100106

File tree

3 files changed

+20
-21
lines changed

3 files changed

+20
-21
lines changed

Cargo.lock

Lines changed: 13 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ edition = "2021"
1111

1212
[dependencies]
1313
regex = "1"
14-
axum = "0.7"
14+
axum = "0.8"
1515
anyhow = "1"
1616
flate2 = "1"
1717
sha2 = "0.10"

src/http.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ pub async fn run_http_server(config: &Configuration, state: Arc<Mutex<AppState>>
3131
let make_service = Router::new()
3232
.route("/summary", get(summary))
3333
.route("/mails", get(mails))
34-
.route("/mails/:id", get(mail))
35-
.route("/mails/:id/errors", get(mail_errors))
34+
.route("/mails/{id}", get(mail))
35+
.route("/mails/{id}/errors", get(mail_errors))
3636
.route("/reports", get(reports))
37-
.route("/reports/:id", get(report))
38-
.route("/reports/:id/json", get(report_json))
39-
.route("/reports/:id/xml", get(report_xml))
37+
.route("/reports/{id}", get(report))
38+
.route("/reports/{id}/json", get(report_json))
39+
.route("/reports/{id}/xml", get(report_xml))
4040
.route("/build", get(build))
4141
.route("/", get(static_file)) // index.html
42-
.route("/*filepath", get(static_file)) // all other files
42+
.route("/{*filepath}", get(static_file)) // all other files
4343
.route_layer(middleware::from_fn_with_state(
4444
config.clone(),
4545
basic_auth_middleware,

0 commit comments

Comments
 (0)