Sha256: e40c1ee9a4dfcccddf05ae53f33492402e5fb924bf0a249a628f51b854e45526

Contents?: true

Size: 330 Bytes

Versions: 3

Compression:

Stored size: 330 Bytes

Contents

class Spree::WebhooksController < Spree::Api::BaseController
  rescue_from(Spree::Webhook::WebhookNotFound) { head :not_found }

  def receive
    webhook = Spree::Webhook.find(params[:id])
    payload = request.request_parameters["webhook"]

    authorize! :receive, webhook

    webhook.receive(payload)

    head :ok
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
solidus_webhooks-0.1.0 app/controllers/spree/webhooks_controller.rb
solidus_webhooks-0.1.0.beta.1 app/controllers/spree/webhooks_controller.rb
solidus_webhooks-0.0.1.v0.1.0.beta.1.1 app/controllers/spree/webhooks_controller.rb