From f0c4808bf8d9d8cc714a4bc34fc2bdd4e189f6b7 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Sun, 27 Oct 2024 12:34:09 -0400 Subject: [PATCH] try group routes --- www-api/app/Config/RoutesV1.php | 17 ++++++++++++----- www-api/app/Controllers/WrenchJobs.php | 2 -- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/www-api/app/Config/RoutesV1.php b/www-api/app/Config/RoutesV1.php index d825a45f..25aa6cba 100644 --- a/www-api/app/Config/RoutesV1.php +++ b/www-api/app/Config/RoutesV1.php @@ -104,12 +104,19 @@ $routes->post('/en/wrench/api/v1/familylist', 'WrenchApi::apigate'); $routes->post('/en/wrench/api/v1/getwallets', 'WrenchApi::apigate'); // to be retired // WALLET FUNCTIONS -$routes->post('/en/wrench/api/v1/wallets', 'WrenchWallet::getWallet'); -$routes->post('/en/wrench/api/v1/kidwallets', 'WrenchWallet::getKidWallet'); -$routes->post('/en/wrench/api/v1/wallets/escrols', 'WrenchWallet::getEscrols'); -$routes->post('/en/wrench/api/v1/wallets/card/request', 'WrenchWallet::requestVirtualCard'); - +//$routes->post('/en/wrench/api/v1/wallets', 'WrenchWallet::getWallet'); +//$routes->post('/en/wrench/api/v1/kidwallets', 'WrenchWallet::getKidWallet'); +//$routes->post('/en/wrench/api/v1/wallets/escrols', 'WrenchWallet::getEscrols'); +//$routes->post('/en/wrench/api/v1/wallets/card/request', 'WrenchWallet::requestVirtualCard'); +$routes->group('/en/wrench/api/v1/', static function ($routes) { + // $routes->get('users', 'Admin\Users::index'); + //$routes->get('blog', 'Admin\Blog::index'); + $routes->post('wallets', 'WrenchWallet::getWallet'); + $routes->post('kidwallets', 'WrenchWallet::getKidWallet'); + $routes->post('wallets/escrols', 'WrenchWallet::getEscrols'); + $routes->post('wallets/card/request', 'WrenchWallet::requestVirtualCard'); +}); $routes->post('/en/wrench/api/v1/familywallet/redeem', 'WrenchWallet::redeemOptions'); $routes->post('/en/wrench/api/v1/familywallet/redeem/options', 'WrenchWallet::redeemOptions'); diff --git a/www-api/app/Controllers/WrenchJobs.php b/www-api/app/Controllers/WrenchJobs.php index 37990185..9b03e4f6 100644 --- a/www-api/app/Controllers/WrenchJobs.php +++ b/www-api/app/Controllers/WrenchJobs.php @@ -110,8 +110,6 @@ class WrenchJobs extends BaseController $out['result_list'] = $filter_job_list; // Fileter result_list to wallet country - - $endpoint = "WRENCH_JOB_INTEREST_COUNT"; $int_list = $this->getCache($endpoint)["result_list"]; $out["interest_list"] = ( isset($int_list) && is_array($int_list) ) ? $int_list : [];