New static data

This commit is contained in:
CHIEFSOFT\ameye
2024-07-04 20:53:52 -04:00
parent 3f7154dd7f
commit 47acbc436f
4 changed files with 59 additions and 13 deletions
+1 -1
View File
@@ -179,7 +179,7 @@ $routes->post('/en/wrench/api/v1/activejobmsglist', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/sitecontact', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/signupcountry', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/signupcountry', 'WrenchGeneralData::signUpCountry');
$routes->post('/en/wrench/api/v1/userscards', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/couponhx', 'WrenchApi::apigate');
@@ -433,4 +433,17 @@ abstract class BaseController extends Controller
curl_close($curl);
return json_decode($result, true);
}
public function familyTypes(){
return [
array("ty"=>"Parent", "id"=>"PARENT", "tag"=>"fam_type_parent"),
array("ty"=>"Relatives", "id"=>"RELATIVES", "tag"=>"fam_type_relatives"),
array("ty"=>"Others", "id"=>"Others", "tag"=>"fam_type_others")
];
}
public function historyTypes(){
return [
array("ty"=>"Completed Jobs", "id"=>"COMPLETED_JOBS", "tag"=>"hist_type_completed_jobs"),
];
}
}
+1 -12
View File
@@ -725,17 +725,6 @@ class WrenchApi extends BaseController
return $bannerArray;
}
private function familyTypes(){
return [
array("ty"=>"Parent", "id"=>"PARENT", "tag"=>"fam_type_parent"),
array("ty"=>"Relatives", "id"=>"RELATIVES", "tag"=>"fam_type_relatives"),
array("ty"=>"Others", "id"=>"Others", "tag"=>"fam_type_others")
];
}
private function historyTypes(){
return [
array("ty"=>"Completed Jobs", "id"=>"COMPLETED_JOBS", "tag"=>"hist_type_completed_jobs"),
];
}
}
@@ -0,0 +1,44 @@
<?php
namespace App\Controllers;
class WrenchGeneralData extends BaseController
{
private $current_env=0;
private $primary_image_sever='';
private$server_tag='';
public function __construct()
{
$this->current_env = $this->getSiteConfigurations("system.live");
$this->primary_image_sever = $this->getSiteConfigurations("system.primary_image_sever");
$this->server_tag = $this->getSiteConfigurations("system.server_tag");
}
public function signUpCountry(){
$in["action"] = WRENCHBOARD_SIGNUP_COUNTRY;
$wrenchboard = new \App\Models\BackendModel();
$ret = $wrenchboard->wrenchboard_api($in, $out);
$out['internal_return'] = $ret;
$endpoint = "SIGNUP_COUNTRY-";
$this->saveCache($endpoint,$out,$timeLine=15000);
// $this->doCacheStep($in, $out);
$final_out = ( new \App\Models\ResultFormatter() )->processOutJson($in, $out);
$final_out["environment"] = $this->current_env + 0;
$final_out["session_image_server"] = $this->primary_image_sever;
$final_out["server_tag"] = $this->server_tag;
$final_out["language"] = "en";
$final_out["ip_loc"] = $this->getIpData();
$final_out["current_version"] = 20240306;
$final_out["family_types"] = $this->familyTypes();
$final_out["history_types"] = $this->historyTypes();
//return json_encode( ( new \App\Models\ResultFormatter() )->processOutJson($in, $out));
return json_encode( $final_out );
}
}