refactor: replace direct SslCertificate queries with server relationship methods for consistency

This commit is contained in:
Andras Bacsai committed 2025-10-09 17:00:05 +02:00
1 parent bf5c08d071
commit f4e5c195fe
19 files changed
+27 -36

No files matched your search

+2 -2
View File
@@ -55,11 +55,11 @@ class StartDragonfly
$this->commands[] = "mkdir -p $this->configuration_dir/ssl";
$server = $this->database->destination->server;
$caCert = SslCertificate::where('server_id', $server->id)->where('is_ca_certificate', true)->first();
$caCert = $server->sslCertificates()->where('is_ca_certificate', true)->first();
if (! $caCert) {
$server->generateCaCertificate();
$caCert = SslCertificate::where('server_id', $server->id)->where('is_ca_certificate', true)->first();
$caCert = $server->sslCertificates()->where('is_ca_certificate', true)->first();
}
if (! $caCert) {