preferences ncache

This commit is contained in:
CHIEFSOFT\ameye
2024-08-08 09:37:42 -04:00
parent b4b1862289
commit d190bda567
2 changed files with 17 additions and 2 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ $routes->post('/en/wrench/api/v1/stepresetpass', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/starttopup', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/topupresult', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/preferences', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/preferences', 'WrenchGeneralData::usersPreferences'); // 'WrenchApi::apigate'
$routes->post('/en/wrench/api/v1/setpreferences', 'WrenchApi::apigate');
+16 -1
View File
@@ -9,6 +9,12 @@ class WrenchGeneralData extends BaseController
}
// case 'preferences':
// $in["action"] = WRENCHBOARD_ACCOUNT_PREFERENCES;
// //preferences // define('WRENCHBOARD_ACCOUNT_PREFERENCES', 11065);
// break;
public function signUpCountry(){
$in["action"] = WRENCHBOARD_SIGNUP_COUNTRY;
$endpoint = "SIGNUP_COUNTRY-";
@@ -23,7 +29,16 @@ class WrenchGeneralData extends BaseController
}
public function usersPreferences(){
//preferences
$in["action"] = WRENCHBOARD_ACCOUNT_PREFERENCES;
$endpoint = "USER_PREFERENCES";
$out = $this->getCache($endpoint); // try find in cache
if ( empty($out) || !is_array($out)){
$ret = $this->wrenchboard->wrenchboard_api($in, $out);
$out['internal_return'] = $ret;
$this->saveCache($endpoint,$out,25000);
}
return $this->summaryReturnData($in,$out); //json_encode( $final_out );
}
}