From 84f1867a21ef229b9eaa671be3775fae3b69ac4b Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Mon, 9 Mar 2026 15:23:15 -0700 Subject: chore: upgrade axum 0.7 to 0.8 to deduplicate with tonic's axum atuin-server used axum 0.7 while tonic already pulled in axum 0.8, resulting in both versions compiled into the binary. Migrates to axum 0.8: path params use {param} syntax, FromRequestParts uses native async traits (dropping async-trait dep from atuin-server). --- crates/atuin-server/src/router.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'crates/atuin-server/src') diff --git a/crates/atuin-server/src/router.rs b/crates/atuin-server/src/router.rs index 0c41d5e6..2d679759 100644 --- a/crates/atuin-server/src/router.rs +++ b/crates/atuin-server/src/router.rs @@ -1,4 +1,3 @@ -use async_trait::async_trait; use atuin_common::api::{ATUIN_CARGO_VERSION, ATUIN_HEADER_VERSION, ErrorResponse}; use axum::{ Router, @@ -22,7 +21,6 @@ use atuin_server_database::{Database, DbError, models::User}; pub struct UserAuth(pub User); -#[async_trait] impl FromRequestParts> for UserAuth where DB: Database, @@ -118,14 +116,14 @@ pub fn router(database: DB, settings: Settings) -> Router { routes = routes .route("/sync/count", get(handlers::history::count)) .route("/sync/history", get(handlers::history::list)) - .route("/sync/calendar/:focus", get(handlers::history::calendar)) + .route("/sync/calendar/{focus}", get(handlers::history::calendar)) .route("/sync/status", get(handlers::status::status)) .route("/history", post(handlers::history::add)) .route("/history", delete(handlers::history::delete)); } let routes = routes - .route("/user/:username", get(handlers::user::get)) + .route("/user/{username}", get(handlers::user::get)) .route("/account", delete(handlers::user::delete)) .route("/account/password", patch(handlers::user::change_password)) .route("/register", post(handlers::user::register)) -- cgit v1.3.1