From e26f77405209ceb9fa807a51eb52a017f7ae387a Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Wed, 20 Sep 2023 01:00:52 +0000 Subject: [PATCH] fix client generation --- Controller/ApiController.php | 4 ++-- Models/Account.php | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Controller/ApiController.php b/Controller/ApiController.php index 297ff06..6097e12 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -1938,7 +1938,7 @@ final class ApiController extends Controller // Create client if ($request->hasData('client')) { - $client = $this->app->moduleManager->get('ClientManagement') + $client = $this->app->moduleManager->get('ClientManagement', 'Api') ->findClientForAccount($account->id, $request->getDataInt('unit')); if ($client === null) { @@ -1956,7 +1956,7 @@ final class ApiController extends Controller $internalRequest->setData('vat_id', $request->getDataString('vat_id') ?? ''); $internalRequest->setData('unit', $request->getDataInt('unit')); - $this->app->moduleManager->get('ClientManagement')->apiClientCreate($internalRequest, $internalResponse); + $this->app->moduleManager->get('ClientManagement', 'Api')->apiClientCreate($internalRequest, $internalResponse); } } diff --git a/Models/Account.php b/Models/Account.php index 89b4913..2f9ebe6 100755 --- a/Models/Account.php +++ b/Models/Account.php @@ -14,8 +14,6 @@ declare(strict_types=1); namespace Modules\Admin\Models; -use phpOMS\Stdlib\Base\Location; - /** * Account class. * @@ -61,7 +59,7 @@ class Account extends \phpOMS\Account\Account /** * Location data. * - * @var Location[] + * @var Address[] * @since 1.0.0 */ public array $locations = [];