|
@@ -24,7 +24,7 @@ public function login(string $email, string $password, string $origem): ?array
|
|
|
$user = User::where("email", $email)->first();
|
|
$user = User::where("email", $email)->first();
|
|
|
|
|
|
|
|
if ($origem === 'admin') {
|
|
if ($origem === 'admin') {
|
|
|
- if ($user->user_type !== UserTypeEnum::ADMIN->value) {
|
|
|
|
|
|
|
+ if ($user->user_type !== UserTypeEnum::ADMIN) {
|
|
|
throw new Exception('credenciais invalidas para acesso de franqueadora');
|
|
throw new Exception('credenciais invalidas para acesso de franqueadora');
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|