refactor(arch): enforce gateway compliance and remove service-wrapping gateways
This commit is contained in:
@@ -6,13 +6,11 @@ use MintyPHP\Repository\Access\RoleRepositoryInterface;
|
||||
use MintyPHP\Repository\Org\DepartmentRepositoryInterface;
|
||||
use MintyPHP\Repository\Tenant\TenantRepositoryInterface;
|
||||
use MintyPHP\Repository\User\UserReadRepositoryInterface;
|
||||
use MintyPHP\Service\User\UserAccountService;
|
||||
|
||||
class UserImportGateway
|
||||
{
|
||||
public function __construct(
|
||||
private readonly UserReadRepositoryInterface $userReadRepository,
|
||||
private readonly UserAccountService $userAccountService,
|
||||
private readonly TenantRepositoryInterface $tenantRepository,
|
||||
private readonly RoleRepositoryInterface $roleRepository,
|
||||
private readonly DepartmentRepositoryInterface $departmentRepository,
|
||||
@@ -53,13 +51,4 @@ class UserImportGateway
|
||||
{
|
||||
return $this->departmentRepository->find($id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<string, mixed> $input
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function createUserFromAdmin(array $input, int $currentUserId): array
|
||||
{
|
||||
return $this->userAccountService->createFromAdmin($input, $currentUserId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user