Class: Spree::Admin::BoltWebhooksController
- Inherits:
-
BaseController
- Object
- BaseController
- Spree::Admin::BoltWebhooksController
- Defined in:
- app/controllers/spree/admin/bolt_webhooks_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/controllers/spree/admin/bolt_webhooks_controller.rb', line 8 def create response = SolidusBolt::Webhooks::CreateService.call( event: bolt_webhook_params[:event], url: bolt_webhook_params[:webhook_url] ) flash[:success] = "Successfully created webhook. Webhook ID #{response['webhook_id']}" render :new rescue SolidusBolt::ServerError => e flash[:error] = e. render :new end |
#new ⇒ Object
6 |
# File 'app/controllers/spree/admin/bolt_webhooks_controller.rb', line 6 def new; end |