Sha256: 6d94b24c4117bd83014cd22a00eb509c8958412394cb789e0bba02d1171b2c8e
Contents?: true
Size: 779 Bytes
Versions: 155
Compression:
Stored size: 779 Bytes
Contents
module Api module V1 class LiveEventsController < ActionController::Base def process_event # rubocop:disable Metrics/AbcSize payload = SymmetricEncryption.decrypt(params[:payload]) payload = JSON.parse(payload) Rails.logger.debug("Processing event type: #{payload['attributes']['event_name']}") Rails.logger.debug("Payload: #{payload}") event = "LiveEvents::#{payload['attributes']['event_name'].camelcase}Event".constantize event.perform_later(payload) head :ok rescue => e # rubocop:disable Style/RescueStandardError Rails.logger.error("Live Events Error: #{e.message} - #{e.backtrace}") render json: { error: "Live Events Error: #{e.message}" }, status: 422 end end end end
Version data entries
155 entries across 155 versions & 1 rubygems