diff options
author | HombreLaser <sebastian-440@live.com> | 2023-03-27 20:41:55 -0600 |
---|---|---|
committer | HombreLaser <sebastian-440@live.com> | 2023-03-27 20:41:55 -0600 |
commit | efc5eb10894fc95487c55628b94024e97cd60139 (patch) | |
tree | 2e18f71385ce9cc62514ed39b9fbf6420e3ca198 /app/controllers/api/addresses_controller.rb | |
parent | 35ec25dcb3d57b17a3dc174503b7d20dd4c46e43 (diff) |
Añade CardsController
Diffstat (limited to 'app/controllers/api/addresses_controller.rb')
-rw-r--r-- | app/controllers/api/addresses_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/api/addresses_controller.rb b/app/controllers/api/addresses_controller.rb index 3319607..e371268 100644 --- a/app/controllers/api/addresses_controller.rb +++ b/app/controllers/api/addresses_controller.rb @@ -32,7 +32,7 @@ module Api begin case @service.call when :not_found - render json: { error_message: 'Not found' }, status: :not_found + render status: :not_found when :unprocessable_entity render json: { error_messages: @service.address.errors.full_messages }, status: :unprocessable_entity else @@ -47,7 +47,7 @@ module Api def destroy @address = current_user_account.addresses.find_by(id: params[:id]) - render json: { error_message: 'Not found' }, status: :not_found and return if @address.nil? + render status: :not_found and return if @address.nil? Services::Addresses::DestroyAddressService.new(current_user_account, params, @address).call render status: :see_other |