Revert "rector: arrrrr"

This reverts commit 16c0cd10d8.
This commit is contained in:
Andras Bacsai
2025-01-07 15:31:43 +01:00
parent da07b4fdcf
commit 1fe4dd722b
349 changed files with 3689 additions and 4184 deletions

View File

@@ -8,7 +8,6 @@ use App\Models\Server;
use App\Models\StandaloneRedis;
use Exception;
use Livewire\Component;
use Throwable;
class General extends Component
{
@@ -71,7 +70,7 @@ class General extends Component
$this->database->is_log_drain_enabled = false;
$this->dispatch('error', 'Log drain is not enabled on the server. Please enable it first.');
return null;
return;
}
$this->database->save();
$this->dispatch('success', 'Database updated.');
@@ -79,8 +78,6 @@ class General extends Component
} catch (Exception $e) {
return handleError($e, $this);
}
return null;
}
public function submit()
@@ -106,8 +103,6 @@ class General extends Component
} finally {
$this->dispatch('refreshEnvs');
}
return null;
}
public function instantSave()
@@ -117,14 +112,14 @@ class General extends Component
$this->dispatch('error', 'Public port is required.');
$this->database->is_public = false;
return null;
return;
}
if ($this->database->is_public) {
if (! str($this->database->status)->startsWith('running')) {
$this->dispatch('error', 'Database must be started to be publicly accessible.');
$this->database->is_public = false;
return null;
return;
}
StartDatabaseProxy::run($this->database);
$this->dispatch('success', 'Database is now publicly accessible.');
@@ -134,13 +129,11 @@ class General extends Component
}
$this->db_url_public = $this->database->external_db_url;
$this->database->save();
} catch (Throwable $e) {
} catch (\Throwable $e) {
$this->database->is_public = ! $this->database->is_public;
return handleError($e, $this);
}
return null;
}
public function refresh(): void