WrenchJobs::sendJobInterest

This commit is contained in:
CHIEFSOFT\ameye
2024-07-09 12:58:39 -04:00
parent a30c760637
commit 257d92a97b
2 changed files with 22 additions and 1 deletions
+1 -1
View File
@@ -204,7 +204,7 @@ $routes->post('/en/wrench/api/v1/uploads', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/myfiles', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/marketmessage', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/marketinterest', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/marketinterest', ' WrenchJobs::sendJobInterest'); //'WrenchApi::apigate'
$routes->post('/en/wrench/api/v1/activejobstatus', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/activetaskstatus', 'WrenchApi::apigate');
+21
View File
@@ -95,6 +95,27 @@ class WrenchJobs extends BaseController
}
*/
public function sendJobInterest(){
$raw_json = file_get_contents('php://input');
$in = json_decode($raw_json, true);
$in["action"] = WRENCHBOARD_JOB_SEND_INTEREST;
$out=[];
$ret = $this->wrenchboard->wrenchboard_api($in, $out);
$out['internal_return'] = $ret;
log_message('critical', "***** ***** WrenchJobs::sendJobInterest Ret = ".$ret );
if ( isset($out['internal_return'])
&& $out["internal_return"] > 0
&& isset( $out['offer_code']) ){
$endpoint = "INTEREST_MSG_".$in["offer_code"]."-". $out["member_id"];
log_message('critical', "***** ***** WrenchJobs::sendJobInterest INTEREST_MSG_ = ".$endpoint );
$this->saveCache($endpoint,$out,25000);
$local_url = "http://".$this->micro_service_net1.":3030/eventInterest";
$outX = $this->APIcall('POST', $local_url, ["message"=>$out]);
}
return $this->respond( $this->summaryReturnData($in,$out), 200);
}
public function assignTask(){
$raw_json = file_get_contents('php://input');