preferences ncache
This commit is contained in:
@@ -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');
|
||||
|
||||
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user