Sha256: a042a4b6035ab21d6053c82623e61eb8817c507ea60c8559afc7f18bfa2fbe06

Contents?: true

Size: 565 Bytes

Versions: 14

Compression:

Stored size: 565 Bytes

Contents

module Spree
  module Api
    module V2
      module Storefront
        class StoresController < ::Spree::Api::V2::BaseController
          def show
            render_serialized_payload { serialize_resource(resource) }
          end

          private

          def scope
            Spree::Store
          end

          def resource
            scope.find_by!(code: params[:code])
          end

          def resource_serializer
            Spree::Api::Dependencies.storefront_store_serializer.constantize
          end
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
spree_api-4.0.9 app/controllers/spree/api/v2/storefront/stores_controller.rb
spree_api-4.1.15 app/controllers/spree/api/v2/storefront/stores_controller.rb
spree_api-4.1.14 app/controllers/spree/api/v2/storefront/stores_controller.rb
spree_api-4.0.8 app/controllers/spree/api/v2/storefront/stores_controller.rb
spree_api-4.1.13.1 app/controllers/spree/api/v2/storefront/stores_controller.rb
spree_api-4.0.7.1 app/controllers/spree/api/v2/storefront/stores_controller.rb
spree_api-4.0.7 app/controllers/spree/api/v2/storefront/stores_controller.rb
spree_api-4.1.13 app/controllers/spree/api/v2/storefront/stores_controller.rb
spree_api-4.0.6 app/controllers/spree/api/v2/storefront/stores_controller.rb
spree_api-4.2.0.rc2 app/controllers/spree/api/v2/storefront/stores_controller.rb
spree_api-4.1.12 app/controllers/spree/api/v2/storefront/stores_controller.rb
spree_api-4.2.0.rc1 app/controllers/spree/api/v2/storefront/stores_controller.rb
spree_api-4.1.11 app/controllers/spree/api/v2/storefront/stores_controller.rb
spree_api-4.1.10 app/controllers/spree/api/v2/storefront/stores_controller.rb