From 6bd3f5ed91a9fb97721132fe9b2a0b3c49228228 Mon Sep 17 00:00:00 2001 From: berkut1 Date: Tue, 11 Jun 2024 08:29:02 +0300 Subject: [PATCH] . --- src/Model/User/UseCase/Create/Handler.php | 2 +- src/Model/User/UseCase/SignUp/Manual/Handler.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Model/User/UseCase/Create/Handler.php b/src/Model/User/UseCase/Create/Handler.php index 95fc053..ba39d24 100644 --- a/src/Model/User/UseCase/Create/Handler.php +++ b/src/Model/User/UseCase/Create/Handler.php @@ -45,7 +45,7 @@ public function handle(Command $command): void $role = new Role($command->role); if(!$role->isUser()){ - $user->changeRole(new Role($command->role)); + $user->changeRole($role); } $this->users->add($user); diff --git a/src/Model/User/UseCase/SignUp/Manual/Handler.php b/src/Model/User/UseCase/SignUp/Manual/Handler.php index e30c72c..4846bd3 100644 --- a/src/Model/User/UseCase/SignUp/Manual/Handler.php +++ b/src/Model/User/UseCase/SignUp/Manual/Handler.php @@ -40,7 +40,7 @@ public function handle(Command $command): void $role = new Role($command->role); if(!$role->isUser()){ - $user->changeRole(new Role($command->role)); + $user->changeRole($role); } $this->users->add($user);