Sha256: 893a9e7d8a5bf553ae3f0f0fa58ca70dd5a0e795b0a9321032991b29ced6acde

Contents?: true

Size: 553 Bytes

Versions: 29

Compression:

Stored size: 553 Bytes

Contents

module Spree
  module Api
    module V2
      module Platform
        class DigitalLinksController < ResourceController
          def reset
            spree_authorize! :update, resource if spree_current_user.present?

            if resource.reset!
              render_serialized_payload { serialize_resource(resource) }
            else
              render_error_payload(resource.errors)
            end
          end

          private

          def model_class
            Spree::DigitalLink
          end
        end
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 3 rubygems

Version Path
spree_api-4.10.1 app/controllers/spree/api/v2/platform/digital_links_controller.rb
spree_api-4.10.0 app/controllers/spree/api/v2/platform/digital_links_controller.rb
spree_api-4.9.0 app/controllers/spree/api/v2/platform/digital_links_controller.rb
spree_api-4.8.3 app/controllers/spree/api/v2/platform/digital_links_controller.rb
spree_api-4.8.2 app/controllers/spree/api/v2/platform/digital_links_controller.rb
spree_api-4.7.3 app/controllers/spree/api/v2/platform/digital_links_controller.rb
spree_api-4.6.6 app/controllers/spree/api/v2/platform/digital_links_controller.rb
spree_api-4.5.5 app/controllers/spree/api/v2/platform/digital_links_controller.rb
spree_api-4.4.1 app/controllers/spree/api/v2/platform/digital_links_controller.rb
spree_api-4.5.4 app/controllers/spree/api/v2/platform/digital_links_controller.rb
spree_api-4.6.5 app/controllers/spree/api/v2/platform/digital_links_controller.rb
spree_api-4.7.2 app/controllers/spree/api/v2/platform/digital_links_controller.rb
spree_api-4.7.1 app/controllers/spree/api/v2/platform/digital_links_controller.rb
spree_api-4.6.4 app/controllers/spree/api/v2/platform/digital_links_controller.rb
spree_api-4.7.0 app/controllers/spree/api/v2/platform/digital_links_controller.rb
spree_api-4.6.3 app/controllers/spree/api/v2/platform/digital_links_controller.rb
spree_api-4.6.2 app/controllers/spree/api/v2/platform/digital_links_controller.rb
spree_api-4.6.1 app/controllers/spree/api/v2/platform/digital_links_controller.rb
spree_api-4.6.0 app/controllers/spree/api/v2/platform/digital_links_controller.rb
spree_api-4.5.3 app/controllers/spree/api/v2/platform/digital_links_controller.rb