From 753bf8499ba5d8815db8d08a1dcf69caa20660cf Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Sat, 1 Apr 2023 12:00:33 -0600 Subject: Mejora estructura del proyecto --- app/controllers/api/addresses_controller.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'app/controllers/api/addresses_controller.rb') diff --git a/app/controllers/api/addresses_controller.rb b/app/controllers/api/addresses_controller.rb index e371268..386e613 100644 --- a/app/controllers/api/addresses_controller.rb +++ b/app/controllers/api/addresses_controller.rb @@ -10,7 +10,7 @@ module Api end def create - @service = Services::Addresses::CreateAddressService.new(current_user_account, service_params) + @service = Addresses::CreateAddressService.new(current_user_account, service_params) begin unless @service.call @@ -27,7 +27,7 @@ module Api end def update - @service = Services::Addresses::UpdateAddressService.new(current_user_account, params[:id], service_params) + @service = Addresses::UpdateAddressService.new(current_user_account, params[:id], service_params) begin case @service.call @@ -49,18 +49,18 @@ module Api render status: :not_found and return if @address.nil? - Services::Addresses::DestroyAddressService.new(current_user_account, params, @address).call + Addresses::DestroyAddressService.new(current_user_account, params, @address).call render status: :see_other end private def serialized_object - Serializers::AddressSerializer.new(@address) + AddressSerializer.new(@address) end def serialized_collection - Serializers::AddressSerializer.new(@addresses.page(params[:page])) + AddressSerializer.new(@addresses.page(params[:page])) end def service_params -- cgit v1.2.3