Sha256: 05d8201ed044d638528e817ba52e7a4af7ecb1807f5005a7d2937599ab518d4a

Contents?: true

Size: 597 Bytes

Versions: 25

Compression:

Stored size: 597 Bytes

Contents

module Spree
  module Api
    module V2
      module Storefront
        class StoresController < ::Spree::Api::V2::ResourceController
          def current
            render_serialized_payload { serialize_resource(current_store) }
          end

          private

          def model_class
            Spree::Store
          end

          def resource
            @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

25 entries across 25 versions & 3 rubygems

Version Path
spree_api-4.10.1 app/controllers/spree/api/v2/storefront/stores_controller.rb
spree_api-4.10.0 app/controllers/spree/api/v2/storefront/stores_controller.rb
spree_api-4.9.0 app/controllers/spree/api/v2/storefront/stores_controller.rb
spree_api-4.8.3 app/controllers/spree/api/v2/storefront/stores_controller.rb
spree_api-4.8.2 app/controllers/spree/api/v2/storefront/stores_controller.rb
spree_api-4.7.3 app/controllers/spree/api/v2/storefront/stores_controller.rb
spree_api-4.6.6 app/controllers/spree/api/v2/storefront/stores_controller.rb
spree_api-4.5.5 app/controllers/spree/api/v2/storefront/stores_controller.rb
spree_api-4.5.4 app/controllers/spree/api/v2/storefront/stores_controller.rb
spree_api-4.6.5 app/controllers/spree/api/v2/storefront/stores_controller.rb
spree_api-4.7.2 app/controllers/spree/api/v2/storefront/stores_controller.rb
spree_api-4.7.1 app/controllers/spree/api/v2/storefront/stores_controller.rb
spree_api-4.6.4 app/controllers/spree/api/v2/storefront/stores_controller.rb
spree_api-4.7.0 app/controllers/spree/api/v2/storefront/stores_controller.rb
spree_api-4.6.3 app/controllers/spree/api/v2/storefront/stores_controller.rb
spree_api-4.6.2 app/controllers/spree/api/v2/storefront/stores_controller.rb
spree_api-4.6.1 app/controllers/spree/api/v2/storefront/stores_controller.rb
spree_api-4.6.0 app/controllers/spree/api/v2/storefront/stores_controller.rb
spree_api-4.5.3 app/controllers/spree/api/v2/storefront/stores_controller.rb
atkhayar-dev-spree-api-0.0.1 app/controllers/spree/api/v2/storefront/stores_controller.rb