change code in some code
This commit is contained in:
@@ -29,7 +29,7 @@ class SendDataToFMSListener implements ShouldQueue
|
||||
$mission = $event->mission;
|
||||
|
||||
$this->getErrorRateService->setInputParameters([
|
||||
'url' => config('fms_web_services.Error_Rate.url'),
|
||||
'username' => config('fms_web_services.Error_Rate.username'),
|
||||
'password' => config('fms_web_services.Error_Rate.password'),
|
||||
'missionArea' => $mission->area['coordinates'],
|
||||
'missionStartDT' => $mission->start_time->format('Y-m-d\TH:i:s'),
|
||||
|
||||
@@ -10,13 +10,11 @@ class GetErrorRateService
|
||||
{
|
||||
protected string $url;
|
||||
protected string $channelName;
|
||||
protected string $password;
|
||||
protected string $username;
|
||||
protected array $inputParameters;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->username = config('fms_web_services.Error_Rate.username');
|
||||
$this->url = config('fms_web_services.Error_Rate.url');
|
||||
$this->channelName = 'fms_error_rate';
|
||||
}
|
||||
|
||||
@@ -48,9 +46,10 @@ class GetErrorRateService
|
||||
public function sendRequest(): array
|
||||
{
|
||||
return Http::withHeaders(['Content-Type' => 'application/json'])
|
||||
->withBody(json_encode($this->inputParameters))
|
||||
->throw()
|
||||
->withoutVerifying()
|
||||
->post($this->url, $this->inputParameters)
|
||||
->post($this->url)
|
||||
->json();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user