Sha256: df9fe470732ef8ad39841d4c046908af703b2f4f24467483ede72b7cbf4d8084

Contents?: true

Size: 411 Bytes

Versions: 7

Compression:

Stored size: 411 Bytes

Contents

class TrelloPayloadParamsHandler
  def initialize(app)
    @app = app
  end

  def call(env)
    params = env['rack.input'].gets
    if params && params['action']
      result = JSON.parse(params)
      if result['action']
        result['event'] = result['action']
        result.delete('action')
        env['action_dispatch.request.request_parameters'] = result
      end
    end
    @app.call(env)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
hubspot-api-client-9.0.0 sample-apps/trello-integration-app/lib/middlewares/trello_payload_params_handler.rb
hubspot-api-client-8.0.1 sample-apps/trello-integration-app/lib/middlewares/trello_payload_params_handler.rb
hubspot-api-client-8.0.0 sample-apps/trello-integration-app/lib/middlewares/trello_payload_params_handler.rb
hubspot-api-client-7.3.0 sample-apps/trello-integration-app/lib/middlewares/trello_payload_params_handler.rb
hubspot-api-client-7.2.0 sample-apps/trello-integration-app/lib/middlewares/trello_payload_params_handler.rb
hubspot-api-client-7.1.1 sample-apps/trello-integration-app/lib/middlewares/trello_payload_params_handler.rb
hubspot-api-client-7.1.0 sample-apps/trello-integration-app/lib/middlewares/trello_payload_params_handler.rb