structural refactor and codebase improvements

This commit is contained in:
2026-08-09 14:58:14 +02:00
parent 22b1dd3f56
commit c9715baab8
247 changed files with 11515 additions and 3063 deletions

View File

@@ -1,24 +1,22 @@
use std::sync::Arc;
use crate::import::commands::DeleteImportProfileCommand;
use crate::import::deps::DeleteImportProfileDeps;
use domain::{
errors::DomainError,
ports::ImportProfileRepository,
value_objects::{ImportProfileId, UserId},
};
pub async fn execute(
import_profile: Arc<dyn ImportProfileRepository>,
deps: &DeleteImportProfileDeps,
cmd: DeleteImportProfileCommand,
) -> Result<(), DomainError> {
let user_id = UserId::from_uuid(cmd.user_id);
let profile_id = ImportProfileId::from_uuid(cmd.profile_id);
import_profile
deps.import_profile
.get(&profile_id, &user_id)
.await?
.ok_or_else(|| DomainError::NotFound("import profile".into()))?;
import_profile.delete(&profile_id).await
deps.import_profile.delete(&profile_id).await
}
#[cfg(test)]