Added name query to accounts and updated query handling.

This commit is contained in:
2026-09-27 10:32:08 +02:00
parent bb58e3fd77
commit d219d63dca
10 changed files with 74 additions and 4 deletions
+3
View File
@@ -28,6 +28,7 @@ pub fn create_router() -> axum::Router<PgPool> {
#[derive(Debug, Deserialize)]
pub struct QueryParams {
pub name: Option<String>,
pub limit: Option<u64>,
pub offset: Option<u64>,
}
@@ -37,8 +38,10 @@ impl TryFrom<QueryParams> for repository::Query {
fn try_from(query: QueryParams) -> Result<Self, Self::Error> {
Ok(repository::Query {
name: query.name,
limit: Some(query.limit.unwrap_or(20)),
offset: query.offset,
..Default::default()
})
}
}