job manager list
This commit is contained in:
@@ -83,7 +83,7 @@ $routes->post('/en/wrench/api/v1/setpreferences', 'WrenchApi::apigate');
|
|||||||
|
|
||||||
$routes->group('/en/wrench/api/v1/', static function ($routes) {
|
$routes->group('/en/wrench/api/v1/', static function ($routes) {
|
||||||
$routes->post('jobmanageragree', 'WrenchApi::apigate');
|
$routes->post('jobmanageragree', 'WrenchApi::apigate');
|
||||||
$routes->post('jobmanagerlist', 'WrenchApi::apigate');
|
$routes->post('jobmanagerlist', 'WrenchJobManager::jobManagerList');
|
||||||
$routes->post('jobmanagerfiles', 'WrenchApi::apigate');
|
$routes->post('jobmanagerfiles', 'WrenchApi::apigate');
|
||||||
$routes->post('jobmanageroffers', 'WrenchApi::apigate');
|
$routes->post('jobmanageroffers', 'WrenchApi::apigate');
|
||||||
$routes->post('jobmanageractive', 'WrenchApi::apigate');
|
$routes->post('jobmanageractive', 'WrenchApi::apigate');
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Controllers;
|
||||||
|
|
||||||
|
use CodeIgniter\API\ResponseTrait;
|
||||||
|
|
||||||
|
class WrenchJobManager extends BaseController
|
||||||
|
{
|
||||||
|
use ResponseTrait;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->request = $request = \Config\Services::request();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function jobManagerList()
|
||||||
|
{
|
||||||
|
$raw_json = file_get_contents('php://input');
|
||||||
|
$in = json_decode($raw_json, true);
|
||||||
|
$in["action"] = WRENCHBOARD_JOB_LISTJOBS;
|
||||||
|
$out = [];
|
||||||
|
$endpoint = "WRENCHBOARD_JOB_LISTJOBS-" . $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::jobManagerList Cache Done:::Ret " . $ret);
|
||||||
|
}
|
||||||
|
log_message('critical', "***** ***** WrenchJobs::jobManagerList Ret ");
|
||||||
|
return $this->respond($this->summaryReturnData($in, $out), 200);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user