Skip to content

Commit

Permalink
Work around Bucket PUT weirdness
Browse files Browse the repository at this point in the history
  • Loading branch information
loafoe committed Oct 3, 2023
1 parent dfd39cd commit c7d658b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion blr/configurations_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,12 @@ func (b *ConfigurationsService) CreateBucket(bucket Bucket) (*Bucket, *Response,
// UpdateBucket updates a bucket
func (b *ConfigurationsService) UpdateBucket(bucket Bucket) (*Bucket, *Response, error) {
bucket.ResourceType = "Bucket"
id := bucket.ID
bucket.ID = "" // Server does not like a value here
if err := b.validate.Struct(bucket); err != nil {
return nil, nil, err
}
req, _ := b.NewRequest(http.MethodPut, "/configuration/Bucket/"+bucket.ID, bucket, nil)
req, _ := b.NewRequest(http.MethodPut, "/configuration/Bucket/"+id, bucket, nil)
req.Header.Set("api-version", blobConfigurationAPIVersion)
req.Header.Set("Content-Type", "application/json")

Expand Down
2 changes: 1 addition & 1 deletion internal/version.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package internal

const (
LibraryVersion = "0.83.1"
LibraryVersion = "0.83.2"
)

0 comments on commit c7d658b

Please sign in to comment.