This commit is contained in:
nurmuhammet committed 2025-05-24 15:25:55 +05:00
1 parent b87afba780
commit 4af1363b8b
4 files changed
+90 -12

No files matched your search

@@ -49,19 +49,14 @@ public function handle(ActionFields $fields, Collection $models)
end_date: $end_date->format('d.m.Y'),
);
$data = json_decode($response);
/** @var ResponseTypes\AzatApiClientInfoAllResponse */
$data = Str::isJson($response)
? json_decode($response)
: emptyClass(errCode: 1, message: 'Connection issue to VP');
// if (! is_array($response)) {
// return ActionResponse::danger('Connection issue');
// }
// if ($response['errCode'] != 0) {
// return ActionResponse::danger($response['message']);
// }
info([
'type' => $data,
]);
if ($data->errCode != 0) {
return ActionResponse::danger($data->message);
}
}
/**