refactor: move AppContext to presentation crate, structurally enforce boundary
All checks were successful
CI / Check / Test (push) Successful in 39m33s
All checks were successful
CI / Check / Test (push) Successful in 39m33s
This commit is contained in:
@@ -22,9 +22,7 @@ pub async fn execute(
|
||||
cmd: CreateImportSessionCommand,
|
||||
) -> Result<CreateSessionResult, DomainError> {
|
||||
let user_id = UserId::from_uuid(cmd.user_id);
|
||||
import_session
|
||||
.delete_expired_for_user(&user_id)
|
||||
.await?;
|
||||
import_session.delete_expired_for_user(&user_id).await?;
|
||||
|
||||
let parsed = document_parser
|
||||
.parse(&cmd.bytes, cmd.format)
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use domain::{errors::DomainError, models::ImportProfile, ports::ImportProfileRepository, value_objects::UserId};
|
||||
use domain::{
|
||||
errors::DomainError, models::ImportProfile, ports::ImportProfileRepository,
|
||||
value_objects::UserId,
|
||||
};
|
||||
|
||||
pub async fn execute(
|
||||
import_profile: Arc<dyn ImportProfileRepository>,
|
||||
|
||||
@@ -11,7 +11,9 @@ async fn returns_empty_when_no_profiles() {
|
||||
let profiles = InMemoryImportProfileRepository::new();
|
||||
|
||||
let user_id = UserId::from_uuid(Uuid::new_v4());
|
||||
let result = list_profiles::execute(Arc::clone(&profiles) as _, &user_id).await.unwrap();
|
||||
let result = list_profiles::execute(Arc::clone(&profiles) as _, &user_id)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
assert!(result.is_empty());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user