Refactor the index page in the CategoryController.
This commit is contained in:
@@ -47,7 +47,6 @@ class CategoryController extends Controller
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
$company = $cart->getCompany();
|
$company = $cart->getCompany();
|
||||||
$companyUUID = $company->uuid;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$company)
|
if(!$company)
|
||||||
@@ -59,7 +58,7 @@ class CategoryController extends Controller
|
|||||||
$fetcher = new ApiFetcher();
|
$fetcher = new ApiFetcher();
|
||||||
$categoryItemAPI = new CategoryItemAPI($fetcher);
|
$categoryItemAPI = new CategoryItemAPI($fetcher);
|
||||||
|
|
||||||
$categoriesItemsMap = $categoryItemAPI->getMap($companyUUID);
|
$categoriesItemsMap = $categoryItemAPI->getMap($company->uuid);
|
||||||
$categoryItemAPI->saveMap($categoriesItemsMap, $company);
|
$categoryItemAPI->saveMap($categoriesItemsMap, $company);
|
||||||
|
|
||||||
// Companies Categories
|
// Companies Categories
|
||||||
|
|||||||
Reference in New Issue
Block a user