job manager list

This commit is contained in:
CHIEFSOFT\ameye
2025-06-07 10:35:21 -04:00
parent 64145ceba3
commit a0ad73c957
2 changed files with 36 additions and 1 deletions
+1 -1
View File
@@ -83,7 +83,7 @@ $routes->post('/en/wrench/api/v1/setpreferences', 'WrenchApi::apigate');
$routes->group('/en/wrench/api/v1/', static function ($routes) {
$routes->post('jobmanageragree', 'WrenchApi::apigate');
$routes->post('jobmanagerlist', 'WrenchApi::apigate');
$routes->post('jobmanagerlist', 'WrenchJobManager::jobManagerList');
$routes->post('jobmanagerfiles', 'WrenchApi::apigate');
$routes->post('jobmanageroffers', '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);
}
}