diff --git a/kernel/modules/module_shop_client/controllers/ModuleShopClientController.php b/kernel/modules/module_shop_client/controllers/ModuleShopClientController.php index 2f69665..a35dd06 100644 --- a/kernel/modules/module_shop_client/controllers/ModuleShopClientController.php +++ b/kernel/modules/module_shop_client/controllers/ModuleShopClientController.php @@ -3,6 +3,7 @@ namespace kernel\modules\module_shop_client\controllers; use GuzzleHttp\Client; +use GuzzleHttp\Exception\GuzzleException; use JetBrains\PhpStorm\NoReturn; use kernel\AdminController; use kernel\helpers\Debug; @@ -24,6 +25,10 @@ class ModuleShopClientController extends AdminController $this->client = new Client(); $this->moduleService = new ModuleService(); } + + /** + * @throws GuzzleException + */ public function actionIndex(int $page_number = 1): void { $per_page = 8; @@ -46,6 +51,9 @@ class ModuleShopClientController extends AdminController ]); } + /** + * @throws GuzzleException + */ public function actionView(int $id): void { $token = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.W10.POQZmGB7EZIayINtYhzu5r1rdgZhF9qPJpaQkl_g6pU'; @@ -58,6 +66,9 @@ class ModuleShopClientController extends AdminController $this->cgView->render("view.php", ['data' => $module_info]); } + /** + * @throws GuzzleException + */ public function actionInstall(): void { $request = new Request(); diff --git a/kernel/modules/module_shop_client/routs/module_shop_client.php b/kernel/modules/module_shop_client/routs/module_shop_client.php index 19de0f0..fa2ef40 100644 --- a/kernel/modules/module_shop_client/routs/module_shop_client.php +++ b/kernel/modules/module_shop_client/routs/module_shop_client.php @@ -12,18 +12,8 @@ App::$collector->group(["prefix" => "admin"], function (RouteCollector $router){ App::$collector->get('/', [\kernel\modules\module_shop_client\controllers\ModuleShopClientController::class, 'actionIndex']); App::$collector->get('/page/{page_number}', [\kernel\modules\module_shop_client\controllers\ModuleShopClientController::class, 'actionIndex']); App::$collector->get('/install', [\kernel\modules\module_shop_client\controllers\ModuleShopClientController::class, 'actionInstall']); -// App::$collector->get('/create', [\kernel\modules\post\controllers\PostController::class, 'actionCreate']); -// App::$collector->post("/", [\kernel\modules\post\controllers\PostController::class, 'actionAdd']); App::$collector->get('/view/{id}', [\kernel\modules\module_shop_client\controllers\ModuleShopClientController::class, 'actionView']); -// App::$collector->any('/update/{id}', [\kernel\modules\post\controllers\PostController::class, 'actionUpdate']); -// App::$collector->any("/edit/{id}", [\kernel\modules\post\controllers\PostController::class, 'actionEdit']); App::$collector->get('/delete', [\kernel\modules\module_shop_client\controllers\ModuleShopClientController::class, 'actionDelete']); }); }); -}); - -//App::$collector->group(["prefix" => "api"], function (CgRouteCollector $router){ -// App::$collector->group(['before' => 'bearer'], function (CgRouteCollector $router){ -// $router->rest("post", [\kernel\modules\post\controllers\PostRestController::class]); -// }); -//}); \ No newline at end of file +}); \ No newline at end of file