Standardized the upsert and delete pattern across the repo.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use uuid::Uuid;
|
||||
|
||||
use super::{QueryConversionError, RepositoryError, dtos::Upserted};
|
||||
use super::{QueryConversionError, RepositoryError, dtos::Upsert};
|
||||
use crate::{
|
||||
database::{Constraint, DatabaseError, dtos::UserAppRow, user_apps as db},
|
||||
domain::UserApp,
|
||||
@@ -59,7 +59,7 @@ where
|
||||
Ok(owner)
|
||||
}
|
||||
|
||||
pub async fn upsert<'e, E>(executor: E, app: UserApp) -> Result<Upserted<UserApp>, RepositoryError>
|
||||
pub async fn upsert<'e, E>(executor: E, app: UserApp) -> Result<Upsert<UserApp>, RepositoryError>
|
||||
where
|
||||
E: sqlx::Executor<'e, Database = sqlx::Postgres>,
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user