dsl struct tags; wip
diff --git a/openstack/cdn/v1/serviceassets/requests.go b/openstack/cdn/v1/serviceassets/requests.go
index 39afaff..3d0543e 100644
--- a/openstack/cdn/v1/serviceassets/requests.go
+++ b/openstack/cdn/v1/serviceassets/requests.go
@@ -24,10 +24,7 @@
// ToCDNAssetDeleteParams formats a DeleteOpts into a query string.
func (opts DeleteOpts) ToCDNAssetDeleteParams() (string, error) {
q, err := gophercloud.BuildQueryString(opts)
- if err != nil {
- return "", err
- }
- return q.String(), nil
+ return q.String(), err
}
// Delete accepts a unique service ID or URL and deletes the CDN service asset associated with
@@ -41,8 +38,15 @@
} else {
url = deleteURL(c, idOrURL)
}
-
- var res DeleteResult
- _, res.Err = c.Delete(url, nil)
- return res
+ var r DeleteResult
+ if opts != nil {
+ q, err := opts.ToCDNAssetDeleteParams()
+ if err != nil {
+ r.Err = err
+ return r
+ }
+ url += q
+ }
+ _, r.Err = c.Delete(url, nil)
+ return r
}