Use spree_api_controller_setup layer

This commit is contained in:
François Turbelin
2020-04-28 16:08:11 +02:00
parent c1d173d601
commit dd9c994f9d

View File

@@ -4,13 +4,8 @@
module DfcProvider
module Api
class ProductsController < ::ActionController::Metal
include ActionController::Head
include AbstractController::Rendering
include ActionController::Rendering
include ActionController::Renderers::All
include ActionController::MimeResponds
include ActionController::ImplicitRender
include AbstractController::Callbacks
include Spree::Api::ControllerSetup
# To access 'base_url' helper
include ActionController::UrlFor
include Rails.application.routes.url_helpers
@@ -20,8 +15,6 @@ module DfcProvider
:check_user,
:check_accessibility
respond_to :json
def index
products = @enterprise.
inventory_variants.