Sha256: cc1d933e90fd60103e2f92215844eb9d2998d1e80920982585ed2accb2108687

Contents?: true

Size: 292 Bytes

Versions: 10

Compression:

Stored size: 292 Bytes

Contents

class WebhooksController < ApplicationController
  skip_before_action :verify_authenticity_token, only: [:callback]

  def callback
    webhooks = JSON.parse(request.raw_post)
    webhooks.each { |webhook| Services::Hubspot::Webhooks::Handle.new(webhook).call }
    render json: {}
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
hubspot-api-client-3.2.0 sample-apps/webhooks-contacts-app/app/controllers/webhooks_controller.rb
hubspot-api-client-3.1.1 sample-apps/webhooks-contacts-app/app/controllers/webhooks_controller.rb
hubspot-api-client-3.1.0.pre.beta sample-apps/webhooks-contacts-app/app/controllers/webhooks_controller.rb
hubspot-api-client-3.0.0.pre.beta sample-apps/webhooks-contacts-app/app/controllers/webhooks_controller.rb
hubspot-api-client-2.3.2 sample-apps/webhooks-contacts-app/app/controllers/webhooks_controller.rb
hubspot-api-client-2.3.1 sample-apps/webhooks-contacts-app/app/controllers/webhooks_controller.rb
hubspot-api-client-2.2.0 sample-apps/webhooks-contacts-app/app/controllers/webhooks_controller.rb
hubspot-api-client-2.1.0 sample-apps/webhooks-contacts-app/app/controllers/webhooks_controller.rb
hubspot-api-client-2.0.0 sample-apps/webhooks-contacts-app/app/controllers/webhooks_controller.rb
hubspot-api-client-1.0.1 sample-apps/webhooks-contacts-app/app/controllers/webhooks_controller.rb