diff --git a/www-api/app/Config/Constants.php b/www-api/app/Config/Constants.php index 4f0bed61..388e3b54 100644 --- a/www-api/app/Config/Constants.php +++ b/www-api/app/Config/Constants.php @@ -270,6 +270,7 @@ define('WRENCHBOARD_ACCOUNT_UPDATE_PREFS', 11066); define('WRENCHBOARD_ACCOUNT_MYPAGE', 11070); define('WRENCHBOARD_ACCOUNT_PAGEINTRO', 11071); +const WRENCHBOARD_LOAD_REFERLINK = 11072; const WRENCHBOARD_VIRTUAL_CARDADD = 11080; const WRENCHBOARD_VIRTUAL_FAMILY_CARD = 11082; diff --git a/www-api/app/Config/RoutesV1.php b/www-api/app/Config/RoutesV1.php index c6ae823f..bcb5be9e 100644 --- a/www-api/app/Config/RoutesV1.php +++ b/www-api/app/Config/RoutesV1.php @@ -21,6 +21,8 @@ $routes->post('/en/wrench/api/v1/faqdata', 'WrenchFaq::apigate'); $routes->post('/en/wrench/api/v1/helpdata', 'WrenchFaq::helpgate'); $routes->post('/en/wrench/api/v1/learnmore', 'WrenchFaq::learnMoreUser'); +$routes->post('/en/wrench/api/v1/loadrefer', 'WrenchAccount::loadRefer'); + $routes->post('/en/wrench/api/v1/apigate', 'WrenchApi::apigate'); $routes->post('/en/wrench/api/v1/generics', 'WrenchApi::apigate'); diff --git a/www-api/app/Controllers/WrenchAccount.php b/www-api/app/Controllers/WrenchAccount.php index d3127142..0e6c82fa 100644 --- a/www-api/app/Controllers/WrenchAccount.php +++ b/www-api/app/Controllers/WrenchAccount.php @@ -45,4 +45,25 @@ class WrenchAccount extends BaseController // return $this->summaryReturnData($in,$out); //json_encode( $final_out ); } + + public function loadRefer(){ + + $out=[]; + + $raw_json = file_get_contents('php://input'); + $raw_array = json_decode($raw_json, true); + $in = $raw_array; + + $in["action"] = WRENCHBOARD_LOAD_REFERLINK; + + $in["loc"] = $_SERVER["REMOTE_ADDR"]; + + // $wrenchboard = new \App\Models\BackendModel(); + $ret = $this->wrenchboard->wrenchboard_api($in, $out); + $out['internal_return'] = $ret; + + return $this->respond( $this->summaryReturnData($in,$out), 200); + + + } } \ No newline at end of file