diff --git a/cdn.go b/cdn.go index 3e5ebec..c506a73 100644 --- a/cdn.go +++ b/cdn.go @@ -41,18 +41,18 @@ type CDNZone struct { DateCreated string `json:"date_created"` Status string `json:"status"` Label string `json:"label"` - OriginScheme string `json:"origin_scheme,omitempty"` - OriginDomain string `json:"origin_domain,omitempty"` - VanityDomain string `json:"vanity_domain,omitempty"` - SSLCert string `json:"ssl_cert,omitempty"` - SSLCertKey string `json:"ssl_cert_key,omitempty"` + OriginScheme string `json:"origin_scheme"` + OriginDomain string `json:"origin_domain"` + VanityDomain string `json:"vanity_domain"` + SSLCert string `json:"ssl_cert"` + SSLCertKey string `json:"ssl_cert_key"` CDNURL string `json:"cdn_url"` CacheSize int `json:"cache_size"` Requests int `json:"requests"` BytesIn int `json:"in_bytes"` BytesOut int `json:"out_bytes"` PacketsPerSec int `json:"packets_per_sec"` - DatePurged string `json:"last_purge,omitempty"` + DatePurged string `json:"last_purge"` CORS bool `json:"cors"` GZIP bool `json:"gzip"` BlockAI bool `json:"block_ai"` @@ -68,10 +68,10 @@ type CDNZoneReq struct { VanityDomain string `json:"vanity_domain,omitempty"` SSLCert string `json:"ssl_cert,omitempty"` SSLCertKey string `json:"ssl_cert_key,omitempty"` - CORS bool `json:"cors"` - GZIP bool `json:"gzip"` - BlockAI bool `json:"block_ai"` - BlockBadBots bool `json:"block_bad_bots"` + CORS *bool `json:"cors,omitempty"` + GZIP *bool `json:"gzip,omitempty"` + BlockAI *bool `json:"block_ai,omitempty"` + BlockBadBots *bool `json:"block_bad_bots,omitempty"` Regions []string `json:"regions,omitempty"` } @@ -339,7 +339,7 @@ func (c *CDNServiceHandler) CreatePushZoneFileEndpoint(ctx context.Context, zone // ListPushZoneFiles will retrieve all CDN push zone file data that have been // uploaded func (c *CDNServiceHandler) ListPushZoneFiles(ctx context.Context, zoneID string) (*CDNZoneFileData, *http.Response, error) { - cdnPushFilesPath := fmt.Sprintf("%s/%s", cdnPushPath, zoneID) + cdnPushFilesPath := fmt.Sprintf("%s/%s/files", cdnPushPath, zoneID) req, err := c.client.NewRequest(ctx, http.MethodGet, cdnPushFilesPath, nil) if err != nil { return nil, nil, err