From d48af9cea4f1eb516ab7a0615dc9a5442d3df520 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Wed, 16 Aug 2023 17:20:01 +0200 Subject: [PATCH] formatter --- bootstrap/helpers/remoteProcess.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bootstrap/helpers/remoteProcess.php b/bootstrap/helpers/remoteProcess.php index f5bb61d75..ecc679b3f 100644 --- a/bootstrap/helpers/remoteProcess.php +++ b/bootstrap/helpers/remoteProcess.php @@ -159,9 +159,9 @@ function refresh_server_connection(PrivateKey $private_key) // Delete the old ssh mux file to force a new one to be created Storage::disk('ssh-mux')->delete($server->muxFilename()); // check if user is authenticated - if (auth()?->user()?->currentTeam()->id) { - auth()->user()->currentTeam()->privateKeys = PrivateKey::where('team_id', auth()->user()->currentTeam()->id)->get(); - } + if (auth()?->user()?->currentTeam()->id) { + auth()->user()->currentTeam()->privateKeys = PrivateKey::where('team_id', auth()->user()->currentTeam()->id)->get(); + } } } @@ -195,7 +195,8 @@ function validateServer(Server $server) } } -function check_server_connection(Server $server) { +function check_server_connection(Server $server) +{ try { refresh_server_connection($server->privateKey); instant_remote_process(['uptime'], $server);