diff --git a/app/workers/certificates.php b/app/workers/certificates.php index 1c2b590969..28a893855c 100644 --- a/app/workers/certificates.php +++ b/app/workers/certificates.php @@ -5,6 +5,7 @@ use Appwrite\Network\Validator\CNAME; use Appwrite\Resque\Worker; use Utopia\App; use Utopia\CLI\Console; +use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\Query; use Utopia\Database\Validator\Authorization; diff --git a/src/Appwrite/Event/Certificate.php b/src/Appwrite/Event/Certificate.php index 59c2ce9a76..894c094961 100644 --- a/src/Appwrite/Event/Certificate.php +++ b/src/Appwrite/Event/Certificate.php @@ -7,8 +7,7 @@ use Utopia\Database\Document; class Certificate extends Event { - protected bool $validateTarget = false; - protected bool $validateCNAME = false; + protected bool $skipRenewCheck = false; protected ?Document $domain = null; public function __construct() @@ -40,49 +39,26 @@ class Certificate extends Event } /** - * Set if the target needs be validated. + * Set if the certificate needs to be validated. * - * @param bool $validateTarget + * @param bool $skipRenewCheck * @return self */ - public function setValidateTarget(bool $validateTarget): self + public function setSkipRenewCheck(bool $skipRenewCheck): self { - $this->validateTarget = $validateTarget; + $this->skipRenewCheck = $skipRenewCheck; return $this; } /** - * Return if the domain target will be validated. + * Return if the certificate needs be validated. * * @return bool */ - public function getValidateTarget(): bool + public function getSkipRenewCheck(): bool { - return $this->validateTarget; - } - - /** - * Set if the CNAME needs to be validated. - * - * @param bool $validateCNAME - * @return self - */ - public function setValidateCNAME(bool $validateCNAME): self - { - $this->validateCNAME = $validateCNAME; - - return $this; - } - - /** - * Return if the CNAME will be validated. - * - * @return bool - */ - public function getValidateCNAME(): bool - { - return $this->validateCNAME; + return $this->skipRenewCheck; } /**