diff --git a/app/Nova/Actions/Sber/SyncWithSystem.php b/app/Nova/Actions/Sber/SyncWithSystem.php index 6c65e88..35a5a8c 100644 --- a/app/Nova/Actions/Sber/SyncWithSystem.php +++ b/app/Nova/Actions/Sber/SyncWithSystem.php @@ -70,13 +70,7 @@ class SyncWithSystem extends Action if (is_object($systemResponse)) { $success = $systemResponse->errCode == 0; } else { - $success = $systemResponse['errCode'] == 0; - } - - if (is_array($systemResponse)) { - $success = $systemResponse['errCode'] == 0; - } else { - $success = $systemResponse->errCode == 0; + $success = $systemResponse['errCode'] == 0 ?? false; } if ($success) { @@ -90,8 +84,8 @@ class SyncWithSystem extends Action } return Action::modal('modal-response', [ - // 'html' => $success ? "Success" : "Fail", - // 'title' => $success ? "Success" : "Fail", + 'html' => $success ? "Success" : "Fail", + 'title' => $success ? "Success" : "Fail", ]); }