Skip to content

Commit

Permalink
Fix http method used on CDN push zone file delete (#321)
Browse files Browse the repository at this point in the history
  • Loading branch information
optik-aper authored Jul 18, 2024
1 parent 40c59d1 commit d2142cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cdn.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,8 @@ func (c *CDNServiceHandler) GetPushZoneFile(ctx context.Context, zoneID, fileNam

// DeletePushZoneFile delete a file in a CDN push zone
func (c *CDNServiceHandler) DeletePushZoneFile(ctx context.Context, zoneID, fileName string) error {
cdnFileGetPath := fmt.Sprintf("%s/%s/files/%s", cdnPushPath, zoneID, fileName)
if _, err := c.client.NewRequest(ctx, http.MethodGet, cdnFileGetPath, nil); err != nil {
cdnFileDelPath := fmt.Sprintf("%s/%s/files/%s", cdnPushPath, zoneID, fileName)
if _, err := c.client.NewRequest(ctx, http.MethodDelete, cdnFileDelPath, nil); err != nil {
return err
}

Expand Down

0 comments on commit d2142cf

Please sign in to comment.