Class: ShopifyApp::WebhooksController

Inherits:
ActionController::Base
  • Object
show all
Includes:
WebhookVerification
Defined in:
app/controllers/shopify_app/webhooks_controller.rb

Instance Method Summary collapse

Instance Method Details

#receiveObject



7
8
9
10
11
12
13
14
# File 'app/controllers/shopify_app/webhooks_controller.rb', line 7

def receive
  params.permit!

  ShopifyAPI::Webhooks::Registry.process(
    ShopifyAPI::Webhooks::Request.new(raw_body: request.raw_post, headers: request.headers.to_h),
  )
  head(:ok)
end