loadProfile

This commit is contained in:
CHIEFSOFT\ameye
2025-06-07 10:59:32 -04:00
parent a0ad73c957
commit ea6b377787
2 changed files with 21 additions and 1 deletions
+1 -1
View File
@@ -61,7 +61,7 @@ $routes->post('/en/wrench/api/v1/offerslist', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/offersresponse', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/activejoblist', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/loadprofile', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/loadprofile', 'WrenchUser::loadProfile');
$routes->post('/en/wrench/api/v1/updateprofile', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/account', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/message', 'WrenchApi::apigate');
+20
View File
@@ -48,5 +48,25 @@ class WrenchUser extends BaseController
return $this->respond( $this->summaryReturnData($in,$out), 200);
}
public function loadProfile()
{
$raw_json = file_get_contents('php://input');
$in = json_decode($raw_json, true);
$in["action"] = WRENCHBOARD_MOBILE_LOADPROFILE;
$out = [];
$endpoint = "WRENCHBOARD_MOBILE_LOADPROFILE-" . $in["client_uid"];
$out = $this->getCache($endpoint);
if (count($out) == 0) {
$ret = $this->wrenchboard->wrenchboard_api($in, $out);
$this->saveCache($endpoint, $out, 1500);
$out['internal_return'] = $ret;
log_message('critical', "***** ***** WrenchJobs::loadProfile Cache Done:::Ret " . $ret);
}
log_message('critical', "***** ***** WrenchJobs::loadProfile Ret ");
return $this->respond($this->summaryReturnData($in, $out), 200);
}
}