Fix Mock OTP
This commit is contained in:
@@ -75,7 +75,7 @@ class AuthController extends Controller
|
||||
}
|
||||
|
||||
return Helper::responseJson(data: [
|
||||
'otp' => $user->otp,
|
||||
// 'otp' => $user->otp,
|
||||
'otp_valid_until' => $user->otp_created_at->addMinutes(config('linksehat.otp_valid_minutes'))
|
||||
], message: 'OTP Terkirim');
|
||||
}
|
||||
@@ -175,6 +175,7 @@ class AuthController extends Controller
|
||||
$user = User::query()->where((filter_var($request->phone_or_email, FILTER_VALIDATE_EMAIL) ? 'email' : 'phone'), $request->phone_or_email)->firstOrFail();
|
||||
|
||||
return Helper::responseJson(data: [
|
||||
'otp' => $user->otp,
|
||||
'otp_valid_until' => $user->otp_created_at ? $user->otp_created_at->addMinutes(config('linksehat.otp_valid_minutes')) : null
|
||||
], message: 'OTP Anda');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user