Lost refactor.

This commit is contained in:
2026-10-08 22:21:01 +02:00
parent 7732b0ecc5
commit 70bd6f48f9
+4 -5
View File
@@ -19,9 +19,7 @@ pub async fn list<'e, E>(executor: E, query: Query) -> Result<Vec<Transaction>,
where where
E: sqlx::Executor<'e, Database = sqlx::Postgres>, E: sqlx::Executor<'e, Database = sqlx::Postgres>,
{ {
let transactions = db::list( let query = db::Query {
executor,
db::Query {
limit: query limit: query
.limit .limit
.map(|l| i64::try_from(l).map_err(|_| QueryConversionError::Limit(l))) .map(|l| i64::try_from(l).map_err(|_| QueryConversionError::Limit(l)))
@@ -30,8 +28,9 @@ where
.offset .offset
.map(|o| i64::try_from(o).map_err(|_| QueryConversionError::Offset(o))) .map(|o| i64::try_from(o).map_err(|_| QueryConversionError::Offset(o)))
.transpose()?, .transpose()?,
}, };
)
let transactions = db::list(executor, query)
.await? .await?
.into_iter() .into_iter()
.map(decode) .map(decode)