summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/controllers/api/addresses_controller.rb2
-rw-r--r--app/controllers/api/cards_controller.rb2
-rw-r--r--app/controllers/api/products_controller.rb2
-rw-r--r--spec/support/shared_examples/requests/delete_request.rb2
4 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/api/addresses_controller.rb b/app/controllers/api/addresses_controller.rb
index 51b6b99..dbd77d9 100644
--- a/app/controllers/api/addresses_controller.rb
+++ b/app/controllers/api/addresses_controller.rb
@@ -50,7 +50,7 @@ module Api
render status: :not_found and return if @address.nil?
Addresses::DestroyAddressService.new(current_user_account, params, @address).call
- render status: :see_other
+ render status: :no_content
end
private
diff --git a/app/controllers/api/cards_controller.rb b/app/controllers/api/cards_controller.rb
index daf5f3a..f9f977b 100644
--- a/app/controllers/api/cards_controller.rb
+++ b/app/controllers/api/cards_controller.rb
@@ -39,7 +39,7 @@ module Api
@card.destroy
- render status: :see_other
+ render status: :no_content
end
private
diff --git a/app/controllers/api/products_controller.rb b/app/controllers/api/products_controller.rb
index 2fa435d..9ebdac8 100644
--- a/app/controllers/api/products_controller.rb
+++ b/app/controllers/api/products_controller.rb
@@ -43,7 +43,7 @@ module Api
render status: :not_found and return if @product.nil?
@product.destroy
- render status: :see_other
+ render status: :no_content
end
private
diff --git a/spec/support/shared_examples/requests/delete_request.rb b/spec/support/shared_examples/requests/delete_request.rb
index caeaae0..95d516e 100644
--- a/spec/support/shared_examples/requests/delete_request.rb
+++ b/spec/support/shared_examples/requests/delete_request.rb
@@ -4,7 +4,7 @@ RSpec.shared_examples 'a DELETE request' do
context 'for an existing resource' do
it 'deletes the resource' do
delete(resource, headers:)
- expect(response).to have_http_status(303)
+ expect(response).to have_http_status(204)
end
end