Merge pull request #176 from sunny-b/master
Storage: fix cdn flush cache endpoint and fix changelog
This commit is contained in:
commit
ddc940d8ef
|
@ -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
|
||||
|
||||
|
|
2
cdn.go
2
cdn.go
|
@ -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 {
|
||||
|
|
|
@ -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)
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue