Repo/db fn name refactor.
This commit is contained in:
@@ -46,14 +46,14 @@ pub async fn list<'e, E>(executor: E, query: Query) -> Result<Vec<UserApp>, Repo
|
||||
where
|
||||
E: sqlx::Executor<'e, Database = sqlx::Postgres>,
|
||||
{
|
||||
Ok(db::query(executor, query.try_into()?)
|
||||
Ok(db::list(executor, query.try_into()?)
|
||||
.await?
|
||||
.into_iter()
|
||||
.map(decode)
|
||||
.collect())
|
||||
}
|
||||
|
||||
pub async fn get<'e, E>(
|
||||
pub async fn get_by_id<'e, E>(
|
||||
executor: E,
|
||||
user_id: Uuid,
|
||||
id: Uuid,
|
||||
@@ -92,7 +92,7 @@ fn classify_upsert_error(error: DatabaseError) -> RepositoryError {
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn delete<'e, E>(
|
||||
pub async fn delete_by_id<'e, E>(
|
||||
executor: E,
|
||||
user_id: Uuid,
|
||||
id: Uuid,
|
||||
|
||||
Reference in New Issue
Block a user