aboutsummaryrefslogtreecommitdiffstats
path: root/crates/atuin-server/src
diff options
context:
space:
mode:
authorEllie Huxtable <ellie@elliehuxtable.com>2026-03-09 15:23:15 -0700
committerEllie Huxtable <ellie@elliehuxtable.com>2026-03-09 16:10:21 -0700
commit84f1867a21ef229b9eaa671be3775fae3b69ac4b (patch)
tree7b15ed5db03a156fe2a313e60e7e2f60cb6d561b /crates/atuin-server/src
parentchore: upgrade thiserror 1.x to 2.x to deduplicate dependency (diff)
downloadatuin-84f1867a21ef229b9eaa671be3775fae3b69ac4b.zip
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).
Diffstat (limited to 'crates/atuin-server/src')
-rw-r--r--crates/atuin-server/src/router.rs6
1 files changed, 2 insertions, 4 deletions
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<DB: Send + Sync> FromRequestParts<AppState<DB>> for UserAuth
where
DB: Database,
@@ -118,14 +116,14 @@ pub fn router<DB: Database>(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))