diff --git a/www-api/app/Config/Routes.php b/www-api/app/Config/Routes.php index 032a05a4..8a80cc23 100644 --- a/www-api/app/Config/Routes.php +++ b/www-api/app/Config/Routes.php @@ -86,6 +86,7 @@ $routes->post('/en/wrench/api/v1/jobmessage', 'WrenchApi::apigate'); $routes->post('/en/wrench/api/v1/pendingjob', 'WrenchApi::apigate'); $routes->post('/en/wrench/api/v1/paymenthx', 'WrenchApi::apigate'); $routes->post('/en/wrench/api/v1/purchasehx', 'WrenchApi::apigate'); +$routes->post('/en/wrench/api/v1/contracthx', 'WrenchJobs::contractHx'); $routes->post('/en/wrench/api/v1/cachecontacts', 'WrenchApi::apigate'); @@ -94,8 +95,8 @@ $routes->post('/en/wrench/api/v1/stepresetpass', 'WrenchApi::apigate'); $routes->post('/en/wrench/api/v1/starttopup', 'WrenchApi::apigate'); $routes->post('/en/wrench/api/v1/topupresult', 'WrenchApi::apigate'); -$routes->post('/en/wrench/api/v1/preferences', 'WrenchApi::apigate'); -$routes->post('/en/wrench/api/v1/setpreferences', 'WrenchApi::apigate'); +$routes->post('/en/wrench/api/v1/preferences', 'WrenchApi::apigate'); +$routes->post('/en/wrench/api/v1/setpreferences', 'WrenchApi::apigate'); $routes->post('/en/wrench/api/v1/jobmanageragree', 'WrenchApi::apigate'); diff --git a/www-api/app/Controllers/WrenchJobs.php b/www-api/app/Controllers/WrenchJobs.php index 3e9cbf30..34a5cafd 100644 --- a/www-api/app/Controllers/WrenchJobs.php +++ b/www-api/app/Controllers/WrenchJobs.php @@ -12,6 +12,16 @@ class WrenchJobs extends BaseController $this->request = $request = \Config\Services::request(); } + public function contractHx(){ + $raw_json = file_get_contents('php://input'); + $in = json_decode($raw_json, true); + + $out=[]; + $local_url = "http://".$this->micro_service_net1.":3033/contractHx"; + $outX = $this->APIcall('GET', $local_url, ["message"=>$out]); + return $this->respond( $this->summaryReturnData($in,$out), 200); + } + public function sendJobInterest(){ $raw_json = file_get_contents('php://input'); $in = json_decode($raw_json, true);