All status

This commit is contained in:
CHIEFSOFT\ameye
2024-10-27 17:28:30 -04:00
parent e4ea1c8564
commit 3df121ff25
2 changed files with 41 additions and 20 deletions
+19 -19
View File
@@ -178,25 +178,25 @@ class WrenchWallet extends BaseController
return json_encode( $final_out );
}
private function getSettings($settingkey, $defaultVal=''){
$raw_json = file_get_contents('php://input');
$in = json_decode($raw_json, true);
$out=[];
$endpoint = "SETTINGS";
$out = $this->getCache($endpoint);
if (!is_array($out) || count($out)==0 ) {
$local_url = "http://".$this->micro_service_net1.":3037/settings";
$out = $this->APIcall('GET', $local_url, $in);
if (count($out['result_list']) > 0 ){ // dont cache empty
$this->saveCache($endpoint,$out,55500);
}
}
if (is_array($out) && count($out['result_list']) > 0 ) {
return (isset($out['result_list'][$settingkey])) ? $out['result_list'][$settingkey]: $defaultVal;
}
return $defaultVal;
}
// private function getSettings($settingkey, $defaultVal=''){
// $raw_json = file_get_contents('php://input');
// $in = json_decode($raw_json, true);
// $out=[];
// $endpoint = "SETTINGS";
// $out = $this->getCache($endpoint);
// if (!is_array($out) || count($out)==0 ) {
// $local_url = "http://".$this->micro_service_net1.":3037/settings";
// $out = $this->APIcall('GET', $local_url, $in);
// if (count($out['result_list']) > 0 ){ // dont cache empty
// $this->saveCache($endpoint,$out,55500);
// }
// }
//
// if (is_array($out) && count($out['result_list']) > 0 ) {
// return (isset($out['result_list'][$settingkey])) ? $out['result_list'][$settingkey]: $defaultVal;
// }
// return $defaultVal;
// }
//getKidWallet from parent side
public function getKidWallet(){
log_message('critical', "0001");