Repo/db fn name refactor.
This commit is contained in:
@@ -45,7 +45,7 @@ pub async fn list<'e, E>(executor: E, query: Query) -> Result<Vec<User>, Reposit
|
||||
where
|
||||
E: sqlx::Executor<'e, Database = sqlx::Postgres>,
|
||||
{
|
||||
let users = db::query(executor, query.try_into()?)
|
||||
let users = db::list(executor, query.try_into()?)
|
||||
.await?
|
||||
.into_iter()
|
||||
.map(decode)
|
||||
@@ -54,7 +54,7 @@ where
|
||||
Ok(users)
|
||||
}
|
||||
|
||||
pub async fn get<'e, E>(executor: E, id: Uuid) -> Result<Option<User>, RepositoryError>
|
||||
pub async fn get_by_id<'e, E>(executor: E, id: Uuid) -> Result<Option<User>, RepositoryError>
|
||||
where
|
||||
E: sqlx::Executor<'e, Database = sqlx::Postgres>,
|
||||
{
|
||||
@@ -72,7 +72,7 @@ where
|
||||
Ok(user.into())
|
||||
}
|
||||
|
||||
pub async fn delete<'e, E>(executor: E, id: Uuid) -> Result<Delete, RepositoryError>
|
||||
pub async fn delete_by_id<'e, E>(executor: E, id: Uuid) -> Result<Delete, RepositoryError>
|
||||
where
|
||||
E: sqlx::Executor<'e, Database = sqlx::Postgres>,
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user