promo end point
This commit is contained in:
@@ -7,6 +7,9 @@ $routes->get('/', 'Home::index');
|
||||
|
||||
$routes->get('/en/wrench/api/v1/test','Home::test');
|
||||
|
||||
|
||||
$routes->post('/en/wrench/api/v1/promoverify', 'Promo::promoVerify');
|
||||
|
||||
$routes->post('/en/wrench/api/v1/playground', 'WrenchPlayGround::apigate');
|
||||
|
||||
$routes->post('/en/wrench/api/v1/authlogin', 'WrenchOauth::apigate');
|
||||
|
||||
@@ -20,7 +20,7 @@ class Promo extends BaseController
|
||||
// $in["promo"] = $promo;
|
||||
// $in["promo_owner"] = $promoOwner;
|
||||
|
||||
log_message('critical', "promoStart::promoStart ********* ALL ".serialize($in) );
|
||||
log_message('critical', "Promo::promoStart ********* ALL ".serialize($in) );
|
||||
$in["loc"] = $_SERVER["REMOTE_ADDR"];
|
||||
$in['limit'] = 10;
|
||||
// $out["firstname"] = "Firstname";
|
||||
@@ -34,6 +34,16 @@ class Promo extends BaseController
|
||||
return $this->respond( $this->summaryReturnData($in,$out), 200);
|
||||
}
|
||||
|
||||
public function promoVerify(){
|
||||
$raw_json = file_get_contents('php://input');
|
||||
$in = json_decode($raw_json, true);
|
||||
$in["action"] = -1; // bad number - we dont want formating WRENCHBOARD_ACCOUNT_JOBLIST; dont send this line , the formater will be confused
|
||||
$out=[];
|
||||
|
||||
|
||||
log_message('critical', "***** ***** Promo::promoVerify Ret ");
|
||||
return $this->respond( $this->summaryReturnData($in,$out), 200);
|
||||
}
|
||||
public function promoTask(){
|
||||
|
||||
$raw_json = file_get_contents('php://input');
|
||||
@@ -56,14 +66,14 @@ class Promo extends BaseController
|
||||
$this->saveCache($endpoint,$out,3000);
|
||||
}
|
||||
$out['internal_return'] = 0; // just backwad comaptobility
|
||||
log_message('critical', "***** ***** WrenchJobs::getJobsData Cache Done:::Ret ");
|
||||
log_message('critical', "***** ***** Promo::getJobsData Cache Done:::Ret ");
|
||||
}
|
||||
|
||||
$endpoint = "WRENCH_JOB_INTEREST_COUNT";
|
||||
$int_list = $this->getCache($endpoint)["result_list"];
|
||||
$out["interest_list"] = ( isset($int_list) && is_array($int_list) ) ? $int_list : [];
|
||||
|
||||
log_message('critical', "***** ***** WrenchJobs::getJobsData Ret ");
|
||||
log_message('critical', "***** ***** Promo::getJobsData Ret ");
|
||||
return $this->respond( $this->summaryReturnData($in,$out), 200);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user