From 875f8566608ead2bddb9dc57eeb5ce799a6c3421 Mon Sep 17 00:00:00 2001 From: lukibeg Date: Sat, 8 Nov 2025 19:52:13 -0300 Subject: [PATCH] =?UTF-8?q?refactor:=20remo=C3=A7=C3=A3o=20de=20l=C3=B3gic?= =?UTF-8?q?a=20de=20neg=C3=B3cio=20duplicada.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/ClientService.php | 3 ++- app/Services/UserService.php | 4 ---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/app/Services/ClientService.php b/app/Services/ClientService.php index 0b0cbd6..4ed0af6 100644 --- a/app/Services/ClientService.php +++ b/app/Services/ClientService.php @@ -10,7 +10,8 @@ class ClientService { public function __construct(protected Client $client) {} - public function addClient($client) { + public function addClient(array $client) + { return Client::create($client); } } diff --git a/app/Services/UserService.php b/app/Services/UserService.php index bed4b22..d72284f 100644 --- a/app/Services/UserService.php +++ b/app/Services/UserService.php @@ -11,10 +11,6 @@ class UserService public function __construct(protected User $user) {} public function createUser(array $user) { - if (User::where('email', '=', $user['email'])) { - throw new \Exception('O e-mail já está cadastrado.'); - } - return User::create($user); } }