diff --git a/app/Http/Livewire/Server/ShowPrivateKey.php b/app/Http/Livewire/Server/ShowPrivateKey.php index a0aa6e1e2..c9c11becb 100644 --- a/app/Http/Livewire/Server/ShowPrivateKey.php +++ b/app/Http/Livewire/Server/ShowPrivateKey.php @@ -14,8 +14,8 @@ class ShowPrivateKey extends Component public function setPrivateKey($newPrivateKeyId) { try { - refresh_server_connection($this->server->privateKey); $oldPrivateKeyId = $this->server->private_key_id; + refresh_server_connection($this->server->privateKey); $this->server->update([ 'private_key_id' => $newPrivateKeyId ]);