feat: fix test
This commit is contained in:
parent
54503caf45
commit
789eadb544
|
|
@ -113,14 +113,10 @@ class AuthController extends Controller
|
||||||
$email = strtolower($request->validated('email'));
|
$email = strtolower($request->validated('email'));
|
||||||
$user = User::where('email', $email)->first();
|
$user = User::where('email', $email)->first();
|
||||||
|
|
||||||
if ($user->hasVerifiedEmail()) {
|
if ($user && ! $user->hasVerifiedEmail()) {
|
||||||
return response()->json([
|
$user->sendEmailVerificationNotification();
|
||||||
'message' => __('api.auth.already_verified'),
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$user->sendEmailVerificationNotification();
|
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'message' => __('api.auth.verification_sent_if_unverified'),
|
'message' => __('api.auth.verification_sent_if_unverified'),
|
||||||
]);
|
]);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue