wip
This commit is contained in:
parent
a6f2a4fac7
commit
ab514bfcf5
1 changed files with 4 additions and 1 deletions
|
@ -13,12 +13,16 @@ class ClearQueuePrinterController
|
|||
|
||||
public function __invoke(string $id)
|
||||
{
|
||||
//todo fetch printer from request instead of doing it on controller
|
||||
$printer = Printer::find($id);
|
||||
|
||||
//todo validate from rquest class
|
||||
$data = request()->input('params');
|
||||
|
||||
$baseUrl = 'http://' .$printer->config->networkFormat();
|
||||
|
||||
|
||||
//todo create service class to send requests
|
||||
$httpClient = Http::withHeaders([
|
||||
// 'Accept-Language' => $integrationProfile->api_credentials['language'],
|
||||
// 'Authorization' => $authToken,
|
||||
|
@ -27,7 +31,6 @@ class ClearQueuePrinterController
|
|||
$url = $baseUrl . '/server/job_queue/job';
|
||||
|
||||
$query = [];
|
||||
|
||||
$method = 'delete';
|
||||
$response = $httpClient->{$method}($url, $method === 'get' ? $query : $data);
|
||||
|
||||
|
|
Loading…
Reference in a new issue