diff --git a/www-api/app/Controllers/BaseController.php b/www-api/app/Controllers/BaseController.php index d6919cc7..cb71e68f 100644 --- a/www-api/app/Controllers/BaseController.php +++ b/www-api/app/Controllers/BaseController.php @@ -94,4 +94,108 @@ abstract class BaseController extends Controller } } + public function getSiteConfigurations($config_item){ + $wrenchboard = new \App\Models\BackendModel(); + return $wrenchboard->cfgReadChar($config_item); + } + + + public function endPointList(){ + + $endpoints = [ + 'apigate' => ['POST'], + 'generics' => ['POST'], + 'createuser' => ['POST'], + 'homebanners' => ['POST'], + 'verifysignuplink' => ['POST'], + 'completesignuplink' => ['POST'], + 'createmobileuser' => ['POST'], + 'completemobileuser' => ['POST'], + 'startresetpasword' => ['POST'], + 'stepresetpass' => ['POST'], + 'userlogin' => ['POST'], + 'authlogin' => ['POST'], + 'startjoblist' => ['POST'], + 'dashdata' => ['POST'], + 'getjobsdata' => ['POST'], + 'offerslist' => ['POST'], + 'offersresponse' => ['POST'], + 'activejoblist' => ['POST'], + 'loadprofile' => ['POST'], + 'updateprofile' => ['POST'], + 'account' => ['POST'], + 'message' => ['POST'], + 'pendingjob' => ['POST'], + 'paymenthx' => ['POST'], + 'purchasehx' => ['POST'], + 'getjob' => ['POST'], + 'mybanklist' => ['POST'], + 'countrybanks' =>['POST'], + 'sendmoney' => ['POST'], + 'sendinterest' => ['POST'], + 'waitinginterest' => ['POST'], + 'sendmoneyfee' => ['POST'], + 'getpendingjobs' => ['POST'], + 'taskmessage' => ['POST'], + 'sendtaskmessage' => ['POST'], + 'activejobmsglist' => ['POST'], + 'getwallets' => ['POST'], + 'sitecontact' => ['POST'], + 'signupcountry' => ['POST'], + 'userscards' => ['POST'], + 'blogdata' => ['POST'], + 'blogitem' => ['POST'], + 'couponhx' => ['POST'], + 'couponpending' => ['POST'], + 'couponredeem' => ['POST'], + 'sendinterestmessage' => ['POST'], + 'replyinterestmessage' => ['POST'], + 'disableaccount' => ['POST'], + 'myjobs' => ['POST'], + 'recipients' => ['POST'], + 'addrecipient' => ['POST'], + 'sendreferral' => ['POST'], + 'refferhx' => ['POST'], + 'accounttypes' => ['POST'], + 'jobmanageragree' => ['POST'], + 'jobmanagerlist' => ['POST'], + 'jobmanageroffers'=> ['POST'], + 'jobmanageractive'=> ['POST'], + 'jobmanagercreatejob'=> ['POST'], + 'jobmanagerupdatejob'=> ['POST'], + 'jobmanagerdeletejob'=> ['POST'], + 'activetaskslist' => ['POST'], + 'profilepasschange' => ['POST'], + 'starttopup' => ['POST'], + 'familylist' => ['POST'], + 'familyadd' => ['POST'], + 'familyupdate' => ['POST'], + 'familymanage' => ['POST'], + 'pendingjobextend' => ['POST'], + 'pendingjobsendtome' => ['POST'], + 'pendingjobcancel' => ['POST'], + 'assigntask' => ['POST'], + 'resources'=> ['POST'], + 'uploads'=> ['POST'], + 'marketmessage'=> ['POST'], + 'marketinterest'=> ['POST'], + 'activejobstatus'=> ['POST'], + 'activetaskstatus'=> ['POST'], + 'offersinterestlist' => ['POST'], + 'offersinterestproc' => ['POST'], + 'offerinterestmsg' => ['POST'], + 'offerinterestlistmsg' => ['POST'], + 'payprevcard' => ['POST'], + 'paynewcard' => ['POST'], + 'paylistcard' => ['POST'], + 'payremcard' => ['POST'], + 'mynotifications' => ['POST'], + 'familysampletasks' => ['POST'], + 'familysuggesttasks' => ['POST'], + 'familysuggestlist' => ['POST'], + 'familywaitingtasks' => ['POST'], + ]; + return $endpoints; + } + } diff --git a/www-api/app/Controllers/WrenchApi.php b/www-api/app/Controllers/WrenchApi.php index b479a183..29454525 100644 --- a/www-api/app/Controllers/WrenchApi.php +++ b/www-api/app/Controllers/WrenchApi.php @@ -7,124 +7,18 @@ use CodeIgniter\API\ResponseTrait; class WrenchApi extends BaseController { - use ResponseTrait; protected $request; - public function __construct() { $this->request = $request = \Config\Services::request(); } - public function index() { - - - $data['envID'] = getenv('ENV_ID'); $data['home_background'] = getenv('HOME_PAGE_BACKGROUND'); return view('welcome_message',$data); } - - private function endPointList(){ - - $endpoints = [ - 'apigate' => ['POST'], - 'generics' => ['POST'], - 'createuser' => ['POST'], - 'homebanners' => ['POST'], - 'verifysignuplink' => ['POST'], - 'completesignuplink' => ['POST'], - 'createmobileuser' => ['POST'], - 'completemobileuser' => ['POST'], - 'startresetpasword' => ['POST'], - 'stepresetpass' => ['POST'], - 'userlogin' => ['POST'], - 'authlogin' => ['POST'], - 'startjoblist' => ['POST'], - 'dashdata' => ['POST'], - 'getjobsdata' => ['POST'], - 'offerslist' => ['POST'], - 'offersresponse' => ['POST'], - 'activejoblist' => ['POST'], - 'loadprofile' => ['POST'], - 'updateprofile' => ['POST'], - 'account' => ['POST'], - 'message' => ['POST'], - 'pendingjob' => ['POST'], - 'paymenthx' => ['POST'], - 'purchasehx' => ['POST'], - 'getjob' => ['POST'], - 'mybanklist' => ['POST'], - 'countrybanks' =>['POST'], - 'sendmoney' => ['POST'], - 'sendinterest' => ['POST'], - 'waitinginterest' => ['POST'], - 'sendmoneyfee' => ['POST'], - 'getpendingjobs' => ['POST'], - 'taskmessage' => ['POST'], - 'sendtaskmessage' => ['POST'], - 'activejobmsglist' => ['POST'], - 'getwallets' => ['POST'], - 'sitecontact' => ['POST'], - 'signupcountry' => ['POST'], - 'userscards' => ['POST'], - 'blogdata' => ['POST'], - 'blogitem' => ['POST'], - 'couponhx' => ['POST'], - 'couponpending' => ['POST'], - 'couponredeem' => ['POST'], - 'sendinterestmessage' => ['POST'], - 'replyinterestmessage' => ['POST'], - 'disableaccount' => ['POST'], - 'myjobs' => ['POST'], - 'recipients' => ['POST'], - 'addrecipient' => ['POST'], - 'sendreferral' => ['POST'], - 'refferhx' => ['POST'], - 'accounttypes' => ['POST'], - 'jobmanageragree' => ['POST'], - 'jobmanagerlist' => ['POST'], - 'jobmanageroffers'=> ['POST'], - 'jobmanageractive'=> ['POST'], - 'jobmanagercreatejob'=> ['POST'], - 'jobmanagerupdatejob'=> ['POST'], - 'jobmanagerdeletejob'=> ['POST'], - 'activetaskslist' => ['POST'], - 'profilepasschange' => ['POST'], - 'starttopup' => ['POST'], - 'familylist' => ['POST'], - 'familyadd' => ['POST'], - 'familyupdate' => ['POST'], - 'familymanage' => ['POST'], - 'pendingjobextend' => ['POST'], - 'pendingjobsendtome' => ['POST'], - 'pendingjobcancel' => ['POST'], - 'assigntask' => ['POST'], - 'resources'=> ['POST'], - 'uploads'=> ['POST'], - 'marketmessage'=> ['POST'], - 'marketinterest'=> ['POST'], - 'activejobstatus'=> ['POST'], - 'activetaskstatus'=> ['POST'], - 'offersinterestlist' => ['POST'], - 'offersinterestproc' => ['POST'], - 'offerinterestmsg' => ['POST'], - 'offerinterestlistmsg' => ['POST'], - 'payprevcard' => ['POST'], - 'paynewcard' => ['POST'], - 'paylistcard' => ['POST'], - 'payremcard' => ['POST'], - 'mynotifications' => ['POST'], - 'familysampletasks' => ['POST'], - 'familysuggesttasks' => ['POST'], - 'familysuggestlist' => ['POST'], - 'familywaitingtasks' => ['POST'], - ]; - return $endpoints; - } - - private function prepareEndPointData($endpoint, $in, &$call_backend=true,&$local_out=[]){ switch ($endpoint) { case 'mynotifications': @@ -595,7 +489,6 @@ class WrenchApi extends BaseController return json_encode( ( new \App\Models\ResultFormatter() )->processOutJson($in, $out)); } - private function doCacheStep($in, $out){ switch ($in["action"]) { @@ -671,11 +564,6 @@ class WrenchApi extends BaseController return $data; } - private function getSiteConfigurations($config_item){ - $wrenchboard = new \App\Models\BackendModel(); - return $wrenchboard->cfgReadChar($config_item); - } - private function dummyData($raw_array) { return [ diff --git a/www-api/app/Controllers/WrenchOauth.php b/www-api/app/Controllers/WrenchOauth.php new file mode 100644 index 00000000..3abfecaa --- /dev/null +++ b/www-api/app/Controllers/WrenchOauth.php @@ -0,0 +1,28 @@ +request = $request = \Config\Services::request(); + } + + public function index() + { + $envID = getenv('ENV_ID'); + } + + public function apigate(){ + log_message('critical', "Oauth-Gate"); + + return []; + } + +} \ No newline at end of file