Repo layer refactor.

This commit is contained in:
2026-10-08 22:18:50 +02:00
parent 3709fcbe02
commit 7732b0ecc5
11 changed files with 216 additions and 195 deletions
+11 -12
View File
@@ -43,18 +43,17 @@ async fn list_user_app_secrets(
Path((user_id, app_id)): Path<(Uuid, Uuid)>,
Query(query): Query<QueryParams>,
) -> Result<Json<Vec<UserAppSecretResponse>>, AppError> {
let secrets = repository::user_app_secrets::list(
&pool,
repository::user_app_secrets::Query {
app_id,
limit: Some(query.limit.unwrap_or(20)),
offset: query.offset,
},
)
.await?
.into_iter()
.map(UserAppSecretResponse::from)
.collect();
let query = repository::user_app_secrets::Query {
app_id,
limit: Some(query.limit.unwrap_or(20)),
offset: query.offset,
};
let secrets = repository::user_app_secrets::list(&pool, query)
.await?
.into_iter()
.map(UserAppSecretResponse::from)
.collect();
Ok(Json(secrets))
}