Skip to content

Commit ddc940d

Browse files
authored
Merge pull request #176 from sunny-b/master
Storage: fix cdn flush cache endpoint and fix changelog
2 parents 04a8dba + 43aa31c commit ddc940d

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

CHANGELOG.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
# Change Log
22

3+
## [v1.4.1] - 2018-08-23
4+
5+
- #176 Fix cdn flush cache API endpoint - @sunny-b
6+
37
## [v1.4.0] - 2018-08-22
48

5-
- #170 Add support for Spaces CDN - @sunny-b
9+
- #175 Add support for Spaces CDN - @sunny-b
610

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

cdn.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ func (c CDNServiceOp) FlushCache(ctx context.Context, id string, flushCacheReque
164164
return nil, NewArgError("id", "cannot be an empty string")
165165
}
166166

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

169169
req, err := c.client.NewRequest(ctx, http.MethodDelete, path, flushCacheRequest)
170170
if err != nil {

cdn_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ func TestCDN_FluchCacheCDN(t *testing.T) {
278278
setup()
279279
defer teardown()
280280

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

godo.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
)
1919

2020
const (
21-
libraryVersion = "1.4.0"
21+
libraryVersion = "1.4.1"
2222
defaultBaseURL = "https://api.digitalocean.com/"
2323
userAgent = "godo/" + libraryVersion
2424
mediaType = "application/json"

0 commit comments

Comments
 (0)