Sha256: 6d89dde6511ca5fb64cd8e4dab0970f75287307ebaf4456345077582c7c50964

Contents?: true

Size: 407 Bytes

Versions: 2

Compression:

Stored size: 407 Bytes

Contents

class Hws::Connectors::WebhooksController < ApplicationController
  protect_from_forgery

  protected

  def render_response(response)
    entity = Hws::Connectors::Dto::Entity.new(name: params['entity'])
    Hws::Connectors.webhooks.to_h[params['controller'].split('/').last].to_h[params['action']].try(:call, entity, response)
    render status: 200, json: { success: true, message: 'success' }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hws-connectors-0.1.1 app/controllers/hws/connectors/webhooks_controller.rb
hws-connectors-0.1.0 app/controllers/hws/connectors/webhooks_controller.rb