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

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

View File

@@ -1342,7 +1342,7 @@ $schema://$host {
isCaCertificate: true,
validityDays: 10 * 365
);
$caCertificate = SslCertificate::where('server_id', $this->id)->where('is_ca_certificate', true)->first();
$caCertificate = $this->sslCertificates()->where('is_ca_certificate', true)->first();
ray('CA certificate generated', $caCertificate);
if ($caCertificate) {
$certificateContent = $caCertificate->ssl_certificate;