New wallet call
This commit is contained in:
@@ -102,12 +102,10 @@ $routes->post('/en/wrench/api/v1/familylist', 'WrenchApi::apigate');
|
||||
//$routes->post('/en/wrench/api/v1/familywallet', 'WrenchApi::apigate');
|
||||
|
||||
|
||||
$routes->post('/en/wrench/api/v1/getwallets', 'WrenchApi::apigate'); // to be retired
|
||||
|
||||
|
||||
$routes->post('/en/wrench/api/v1/getwallets', 'WrenchApi::apigate'); // to be retired
|
||||
// WALLET FUNCTIONS
|
||||
$routes->post('/en/wrench/api/v1/wallets', 'WrenchWallet::getWallet');
|
||||
$routes->post('/en/wrench/api/v1/kidwallets', 'WrenchWallet::getKidWallet');
|
||||
|
||||
$routes->post('/en/wrench/api/v1/wallets/escrols', 'WrenchWallet::getEscrols');
|
||||
|
||||
$routes->post('/en/wrench/api/v1/familywallet/redeem', 'WrenchWallet::redeemOptions');
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user