Skip to content

Commit

Permalink
Merge pull request #176 from sunny-b/master
Browse files Browse the repository at this point in the history
Storage: fix cdn flush cache endpoint and fix changelog
  • Loading branch information
mauricio committed Aug 23, 2018
2 parents 04a8dba + 43aa31c commit ddc940d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Change Log

## [v1.4.1] - 2018-08-23

- #176 Fix cdn flush cache API endpoint - @sunny-b

## [v1.4.0] - 2018-08-22

- #170 Add support for Spaces CDN - @sunny-b
- #175 Add support for Spaces CDN - @sunny-b

## [v1.3.0] - 2018-05-24

Expand Down
2 changes: 1 addition & 1 deletion cdn.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func (c CDNServiceOp) FlushCache(ctx context.Context, id string, flushCacheReque
return nil, NewArgError("id", "cannot be an empty string")
}

path := fmt.Sprintf("%s/%s", cdnBasePath, id)
path := fmt.Sprintf("%s/%s/cache", cdnBasePath, id)

req, err := c.client.NewRequest(ctx, http.MethodDelete, path, flushCacheRequest)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion cdn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ func TestCDN_FluchCacheCDN(t *testing.T) {
setup()
defer teardown()

mux.HandleFunc("/v2/cdn/endpoints/12345", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/v2/cdn/endpoints/12345/cache", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, http.MethodDelete)
})

Expand Down
2 changes: 1 addition & 1 deletion godo.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
)

const (
libraryVersion = "1.4.0"
libraryVersion = "1.4.1"
defaultBaseURL = "https://api.digitalocean.com/"
userAgent = "godo/" + libraryVersion
mediaType = "application/json"
Expand Down

0 comments on commit ddc940d

Please sign in to comment.