summaryrefslogtreecommitdiff
path: root/app/controllers/api
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/api')
-rw-r--r--app/controllers/api/addresses_controller.rb10
-rw-r--r--app/controllers/api/cards_controller.rb4
-rw-r--r--app/controllers/api/companies_controller.rb4
-rw-r--r--app/controllers/api/products_controller.rb4
-rw-r--r--app/controllers/api/refresh_tokens_controller.rb2
-rw-r--r--app/controllers/api/user_accounts_controller.rb2
6 files changed, 13 insertions, 13 deletions
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
diff --git a/app/controllers/api/cards_controller.rb b/app/controllers/api/cards_controller.rb
index a890ce7..41d6138 100644
--- a/app/controllers/api/cards_controller.rb
+++ b/app/controllers/api/cards_controller.rb
@@ -45,11 +45,11 @@ module Api
private
def serialized_collection
- Serializers::CardSerializer.new(@cards)
+ CardSerializer.new(@cards)
end
def serialized_object
- Serializers::CardSerializer.new(@card)
+ CardSerializer.new(@card)
end
def permitted_params
diff --git a/app/controllers/api/companies_controller.rb b/app/controllers/api/companies_controller.rb
index b79c58b..19e3493 100644
--- a/app/controllers/api/companies_controller.rb
+++ b/app/controllers/api/companies_controller.rb
@@ -40,11 +40,11 @@ module Api
private
def serialized_object
- Serializers::CompanySerializer.new(@company)
+ CompanySerializer.new(@company)
end
def serialized_collection
- Serializers::CompanySerializer.new(@companies.includes(logo_attachment: :blob).page(params[:page]))
+ CompanySerializer.new(@companies.includes(logo_attachment: :blob).page(params[:page]))
end
def permitted_params
diff --git a/app/controllers/api/products_controller.rb b/app/controllers/api/products_controller.rb
index 5fa7763..5ebd6b6 100644
--- a/app/controllers/api/products_controller.rb
+++ b/app/controllers/api/products_controller.rb
@@ -55,11 +55,11 @@ module Api
end
def serialized_object(public_id)
- Serializers::ProductSerializer.new(scope.find_by(public_id:))
+ ProductSerializer.new(scope.find_by(public_id:))
end
def serialized_collection
- Serializers::ProductSerializer.new(scope.page(params[:page]))
+ ProductSerializer.new(scope.page(params[:page]))
end
def permitted_params
diff --git a/app/controllers/api/refresh_tokens_controller.rb b/app/controllers/api/refresh_tokens_controller.rb
index 5ce447d..6d4c1dd 100644
--- a/app/controllers/api/refresh_tokens_controller.rb
+++ b/app/controllers/api/refresh_tokens_controller.rb
@@ -15,7 +15,7 @@ module Api
end
def service
- @service ||= Services::TokenGenerationService.new(service_params)
+ @service ||= TokenGenerationService.new(service_params)
end
end
end
diff --git a/app/controllers/api/user_accounts_controller.rb b/app/controllers/api/user_accounts_controller.rb
index 1bbdcf5..ad276b5 100644
--- a/app/controllers/api/user_accounts_controller.rb
+++ b/app/controllers/api/user_accounts_controller.rb
@@ -28,7 +28,7 @@ module Api
private
def serialized_object
- Serializers::UserAccountSerializer.new(current_user_account)
+ UserAccountSerializer.new(current_user_account)
end
def service_params