Class: AnedotWebhooks::WebhooksController
- Inherits:
-
ApplicationController
- Object
- ActionController::API
- ApplicationController
- AnedotWebhooks::WebhooksController
- Defined in:
- app/controllers/anedot_webhooks/webhooks_controller.rb
Instance Method Summary collapse
Instance Method Details
#receive ⇒ Object
5 6 7 8 9 10 |
# File 'app/controllers/anedot_webhooks/webhooks_controller.rb', line 5 def receive event = Event.new(name: @payload["event"], payload: @payload["payload"]) ActiveSupport::Notifications.instrument(event.notification_name, event: event) ActiveSupport::Notifications.instrument("anedot_webhooks.event", event: event) head :ok end |