update api register
This commit is contained in:
@@ -19,6 +19,8 @@ class AuthService
|
||||
'whatsapp_number' => $data['whatsapp_number'],
|
||||
'password' => Hash::make($data['password']),
|
||||
'is_master' => false,
|
||||
'is_platform_staff' => false,
|
||||
'access_level' => 'customer',
|
||||
'status' => 'inactive',
|
||||
'verification_channel' => $data['verification_channel'],
|
||||
'verification_target' => $data['verification_target'],
|
||||
@@ -32,7 +34,8 @@ class AuthService
|
||||
'verification' => [
|
||||
'channel' => $user->verification_channel,
|
||||
'target' => $user->verification_target,
|
||||
'code' => $code,
|
||||
'code' => config('registration.show_verification_code') ? $code : null,
|
||||
'code_visible' => (bool) config('registration.show_verification_code'),
|
||||
'expires_at' => $user->verification_code_expires_at,
|
||||
],
|
||||
];
|
||||
@@ -45,7 +48,7 @@ class AuthService
|
||||
->where('verification_target', $data['verification_target'])
|
||||
->first();
|
||||
|
||||
if (!$user) {
|
||||
if (! $user) {
|
||||
throw ValidationException::withMessages([
|
||||
'verification_target' => 'Target verifikasi tidak ditemukan.',
|
||||
]);
|
||||
@@ -83,7 +86,7 @@ class AuthService
|
||||
->where('verification_target', $data['verification_target'])
|
||||
->first();
|
||||
|
||||
if (!$user) {
|
||||
if (! $user) {
|
||||
throw ValidationException::withMessages([
|
||||
'verification_target' => 'Target verifikasi tidak ditemukan.',
|
||||
]);
|
||||
@@ -105,7 +108,8 @@ class AuthService
|
||||
return [
|
||||
'channel' => $user->verification_channel,
|
||||
'target' => $user->verification_target,
|
||||
'code' => $code,
|
||||
'code' => config('registration.show_verification_code') ? $code : null,
|
||||
'code_visible' => (bool) config('registration.show_verification_code'),
|
||||
'expires_at' => $user->verification_code_expires_at,
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user