New wallet call

This commit is contained in:
CHIEFSOFT\ameye
2024-10-14 13:26:20 -04:00
parent 13b3a7461f
commit d10f0279fa
2 changed files with 18 additions and 4 deletions
+16
View File
@@ -242,6 +242,22 @@ class WrenchWallet extends BaseController
return $this->respond( $this->summaryReturnData($in,$out), 200);
}
public function getWallet(){
$raw_json = file_get_contents('php://input');
$in = json_decode($raw_json, true);
$in["action"] = 'getwallets';
$out=[];
$endpoint = "USERS_WALLETS-". $in["uid"];
$out = $this->getCache($endpoint);
if ( count($out)==0 ){
$local_url = "http://".$this->micro_service_net1.":3037/getwallets";
$out = $this->APIcall('GET', $local_url, $in);
$this->saveCache($endpoint,$out,1500);
}
log_message('critical', "***** ***** WrenchJobs::getWallet Ret ");
return $this->respond( $this->summaryReturnData($in,$out), 200);
}
public function getWalletOld(){
log_message('critical', "0001");
header('Access-Control-Allow-Origin: *');
log_message('critical', "WrenchWallet Path getWallet 001");