refactoring hexagonal architecture

This commit is contained in:
Dionisio
2026-02-06 20:57:00 +01:00
parent 4ac141fe36
commit c952e82b27
13 changed files with 439 additions and 144 deletions
+2 -2
View File
@@ -495,7 +495,7 @@ mod tests {
let mut shares = self.shares.lock().unwrap();
if !shares.contains_key(&share.id) {
return Err(DomainError::NotFound(format!("Share with ID {} not found for update", share.id)));
return Err(DomainError::not_found("Share", &share.id));
}
shares.insert(share.id.clone(), share.clone());
@@ -509,7 +509,7 @@ mod tests {
// Find the share to get the token
let share = shares.get(id)
.ok_or_else(|| DomainError::NotFound(format!("Share with ID {} not found for deletion", id)))?;
.ok_or_else(|| DomainError::not_found("Share", id))?;
// Remove token mapping
tokens.remove(&share.token);