mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-21 13:33:57 +00:00
Code sync from Shipping Portal, independent deployment of Vue Polling, Performance Improvement and tweaking for better user experience
This commit is contained in:
@@ -4,9 +4,8 @@ namespace App\Classes\Modules\Jobs\ControllersLogic;
|
||||
|
||||
|
||||
use App\Classes\General\Abstracts\AbstractControllerLogic;
|
||||
use App\Classes\Modules\Jobs\Services\FetchesJobResult;
|
||||
use App\Classes\Modules\Jobs\Processors\FetchesJobResultProcessor;
|
||||
use App\Http\Resources\JobResultResource;
|
||||
use ErrorException;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
@@ -23,16 +22,16 @@ class FetchJobResultLogic extends AbstractControllerLogic
|
||||
];
|
||||
}
|
||||
|
||||
/** @var FetchesJobResult */
|
||||
private $fetchesJobResult;
|
||||
/** @var FetchesJobResultProcessor */
|
||||
private $fetchesJobResultProcessor;
|
||||
|
||||
/**
|
||||
* FetchJobResultLogic constructor.
|
||||
* @param FetchesJobResult $fetchesJobResult
|
||||
* @param FetchesJobResultProcessor $fetchesJobResultProcessor
|
||||
*/
|
||||
public function __construct(FetchesJobResult $fetchesJobResult)
|
||||
public function __construct(FetchesJobResultProcessor $fetchesJobResultProcessor)
|
||||
{
|
||||
$this->fetchesJobResult = $fetchesJobResult;
|
||||
$this->fetchesJobResultProcessor = $fetchesJobResultProcessor;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,10 +44,8 @@ class FetchJobResultLogic extends AbstractControllerLogic
|
||||
*/
|
||||
public function logic(Request $request) : JsonResponse
|
||||
{
|
||||
$query = $this->fetchesJobResult->execute(['job_id' => $request->route('job_id')]);
|
||||
|
||||
$query = $this->fetchesJobResultProcessor->execute($request);
|
||||
return $this->resourceResponse(new JobResultResource($query));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user