new banner function

This commit is contained in:
CHIEFSOFT\ameye
2024-07-19 19:14:07 -04:00
parent b46c6a99ee
commit 7b93c28fbe
2 changed files with 26 additions and 1 deletions
+1 -1
View File
@@ -109,7 +109,7 @@ $routes->post('/en/wrench/api/v1/familywallet', 'WrenchWal
$routes->post('/en/wrench/api/v1/familyresources', 'WrenchResources::familyresources');
$routes->post('/en/wrench/api/v1/commonmedia', 'WrenchResources::commonmedia');
$routes->post('/en/wrench/api/v1/familybanners', 'WrenchBanners::apigate'); // class WrenchBanners WrenchApi
$routes->post('/en/wrench/api/v1/familybanners', 'WrenchBanners::familyBanners'); // class WrenchBanners WrenchApi
$routes->post('/en/wrench/api/v1/familyrewardhx', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/familytransferstart', 'WrenchApi::apigate');
+25
View File
@@ -12,6 +12,31 @@ class WrenchBanners extends BaseController
{
return [];
}
/*
{
"action": 11200,
"member_id": "379",
"uid": "5c2f7660-2214-4c75-98b0-12e44c0d7e78",
"sessionid": "800EBCB2C336A6954BB4FA589988092434B6221CBCCF9E1D92F09D9E10CA77AC",
"limit": 30,
"offset": 0
}
*/
public function familyBanners(){
$raw_json = file_get_contents('php://input');
$in = json_decode($raw_json, true);
// $in["action"] = WRENCHBOARD_ACCOUNT_LOGIN;
$endpoint = "FAMILY_BANNERS-". $in["uid"]; // str_pad($in["uid"], 12, "0", STR_PAD_LEFT);
$out = $this->getCache($endpoint); // try find in cache
if ( count($out) == 0 ){
$local_url = "http://".$this->micro_service_net1.":3032/familybanners";
$out = $this->APIcall('GET', $local_url, $in);
$this->saveCache($endpoint,$out,1500);
}
return $this->summaryReturnData($in,$out); //json_encode( $final_out );
}
public function apigate(){
log_message('critical', "0001");