Shifting object storage operations to common delete result
diff --git a/openstack/objectstorage/v1/objects/requests.go b/openstack/objectstorage/v1/objects/requests.go
index 0ad0315..59ea81f 100644
--- a/openstack/objectstorage/v1/objects/requests.go
+++ b/openstack/objectstorage/v1/objects/requests.go
@@ -304,12 +304,11 @@
url += query
}
- resp, err := perigee.Request("DELETE", url, perigee.Options{
+ _, res.Err = perigee.Request("DELETE", url, perigee.Options{
MoreHeaders: c.AuthenticatedHeaders(),
OkCodes: []int{204},
})
- res.Header = resp.HttpResponse.Header
- res.Err = err
+
return res
}
diff --git a/openstack/objectstorage/v1/objects/results.go b/openstack/objectstorage/v1/objects/results.go
index f85f1ac..c8f8b94 100644
--- a/openstack/objectstorage/v1/objects/results.go
+++ b/openstack/objectstorage/v1/objects/results.go
@@ -146,7 +146,7 @@
// DeleteResult represents the result of a delete operation.
type DeleteResult struct {
- commonResult
+ gophercloud.ExtractErrResult
}
// CopyResult represents the result of a copy operation.