Set correct prop check $customerInfo->exists on api v2 customer store
This commit is contained in:
parent
13b7228b6d
commit
aeaa44e8c6
1 changed files with 1 additions and 1 deletions
|
|
@ -46,7 +46,7 @@ class CustomerController extends Controller
|
|||
|
||||
/** @var \App\Models\CustomerInfo */
|
||||
$customerInfo = $customer->info($service->brand, Customer::FIRST_OR_NEW);
|
||||
if ($customerInfo->id) {
|
||||
if ($customerInfo->exists) {
|
||||
throw new ApiErrorException(ApiError::customerExists());
|
||||
}
|
||||
$customerInfo->fill($request->validated());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue