From: Michal Fojtik <[email protected]> * All :destroy operation should return 'nil' when they succeed
Signed-off-by: Michal fojtik <[email protected]> --- client/lib/client_bucket_methods.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/lib/client_bucket_methods.rb b/client/lib/client_bucket_methods.rb index 44eca0f..a3dfda0 100644 --- a/client/lib/client_bucket_methods.rb +++ b/client/lib/client_bucket_methods.rb @@ -27,7 +27,7 @@ module ClientBucketMethods #actually response here is 204 - no content - so nothing returned to client? request(:delete, "#{api_uri.to_s}/buckets/#{params['id']}") do |response| handle_backend_error(response) if response.code!=204 - response + nil if response.code == 204 end end @@ -53,7 +53,7 @@ module ClientBucketMethods def destroy_blob(params) request(:delete, "#{api_uri.to_s}/buckets/#{params['bucket']}/#{params[:id]}") do |response| handle_backend_error(response) if response.code!=204 - response + nil if response.code == 204 end end -- 1.7.10.2
