End point job list

This commit is contained in:
DESKTOP-GBA0BK8\Admin
2023-04-26 13:41:37 -04:00
parent 9997a6750b
commit 362610e0bb
5 changed files with 13 additions and 0 deletions
+1
View File
@@ -212,6 +212,7 @@ define('WRENCHBOARD_ACCOUNT_HOMEBANNERS', 11200);
define('WRENCHBOARD_USER_DELETEACC', 11990);
define('WRENCHBOARD_ACCOUNT_END', 11999);
//**************************************************************
define('WRENCHBOARD_JOB_LISTJOBS', 13005);
define('WRENCHBOARD_JOB_CREATEJOB',13010 );
define('WRENCHBOARD_JOB_DELETEJOB',13011 );
+3
View File
@@ -62,6 +62,9 @@ $routes->post('/en/wrench/api/v1/pendingjob', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/paymenthx', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/purchasehx', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/jobmanagerlist', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/recipients', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/sendreferral', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/refferhx', 'WrenchApi::apigate');
+4
View File
@@ -76,12 +76,16 @@ class WrenchApi extends BaseController
'sendreferral' => ['POST'],
'refferhx' => ['POST'],
'accounttypes' => ['POST'],
'jobmanagerlist' => ['POST'],
];
return $endpoints;
}
private function prepareEndPointData($endpoint, $in, &$call_backend=true,&$local_out=[]){
switch ($endpoint) {
case 'jobmanagerlist':
$in["action"] = WRENCHBOARD_JOB_LISTJOBS;
break;
case 'homebanners':
$in["action"] = WRENCHBOARD_ACCOUNT_HOMEBANNERS ;
break;
+1
View File
@@ -117,6 +117,7 @@ define('WRENCHBOARD_ACCOUNT_HOMEBANNERS', 11200);
define('WRENCHBOARD_USER_DELETEACC', 11990);
define('WRENCHBOARD_ACCOUNT_END', 11999);
//**************************************************************
define('WRENCHBOARD_JOB_LISTJOBS', 13005);
define('WRENCHBOARD_JOB_CREATEJOB',13010 );
define('WRENCHBOARD_JOB_DELETEJOB',13011 );
+4
View File
@@ -55,6 +55,7 @@ $endpoints = array(
'sendreferral' => array('POST'),
'refferhx' => array('POST'),
'accounttypes' => array('POST'),
'jobmanagerlist' => array('POST'),
);
$call_backend = true; // sometimes we need to overwite the call to the extenstion API
@@ -117,6 +118,9 @@ if ($_SERVER["REQUEST_METHOD"] == "GET") {
}
$in["loc"] = $_SERVER["REMOTE_ADDR"];
switch ($endpoint) {
case 'jobmanagerlist':
$in["action"] = WRENCHBOARD_JOB_LISTJOBS;
break;
case 'homebanners':
$in["action"] = WRENCHBOARD_ACCOUNT_HOMEBANNERS ;
break;