fix: incorrect nil check logic in tencentcloud cdn and ecdn deployment

This commit is contained in:
Fu Diwei 2025-01-08 16:05:02 +08:00
parent 0f772d55ab
commit eb3fec1ac0
4 changed files with 4 additions and 4 deletions

View File

@ -210,7 +210,7 @@ func createDeployer(provider domain.DeployProviderType, accessConfig string, dep
return deployer, logger, err
}
case domain.DeployProviderTypeK8sSecret:
case domain.DeployProviderTypeKubernetesSecret:
{
access := &domain.AccessConfigForKubernetes{}
if err := json.Unmarshal([]byte(accessConfig), access); err != nil {

View File

@ -51,7 +51,7 @@ const (
DeployProviderTypeDogeCloudCDN = DeployProviderType("dogecloud-cdn")
DeployProviderTypeHuaweiCloudCDN = DeployProviderType("huaweicloud-cdn")
DeployProviderTypeHuaweiCloudELB = DeployProviderType("huaweicloud-elb")
DeployProviderTypeK8sSecret = DeployProviderType("k8s-secret")
DeployProviderTypeKubernetesSecret = DeployProviderType("k8s-secret")
DeployProviderTypeLocal = DeployProviderType("local")
DeployProviderTypeQiniuCDN = DeployProviderType("qiniu-cdn")
DeployProviderTypeSSH = DeployProviderType("ssh")

View File

@ -147,7 +147,7 @@ func (d *TencentCloudCDNDeployer) getDomainsByCertificateId(cloudCertId string)
}
domains := make([]string, 0)
if describeCertDomainsResp.Response.Domains == nil {
if describeCertDomainsResp.Response.Domains != nil {
for _, domain := range describeCertDomainsResp.Response.Domains {
domains = append(domains, *domain)
}

View File

@ -130,7 +130,7 @@ func (d *TencentCloudECDNDeployer) getDomainsByCertificateId(cloudCertId string)
}
domains := make([]string, 0)
if describeCertDomainsResp.Response.Domains == nil {
if describeCertDomainsResp.Response.Domains != nil {
for _, domain := range describeCertDomainsResp.Response.Domains {
domains = append(domains, *domain)
}