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

Version Path
canvas_sync-0.20.5 app/controllers/api/v1/live_events_controller.rb
canvas_sync-0.20.4 app/controllers/api/v1/live_events_controller.rb
canvas_sync-0.20.3 app/controllers/api/v1/live_events_controller.rb
canvas_sync-0.19.1.beta2 app/controllers/api/v1/live_events_controller.rb
canvas_sync-0.19.1.beta1 app/controllers/api/v1/live_events_controller.rb
canvas_sync-0.19.0 app/controllers/api/v1/live_events_controller.rb
canvas_sync-0.19.0.beta10 app/controllers/api/v1/live_events_controller.rb
canvas_sync-0.19.0.beta9 app/controllers/api/v1/live_events_controller.rb
canvas_sync-0.19.0.beta8 app/controllers/api/v1/live_events_controller.rb
canvas_sync-0.19.0.beta7 app/controllers/api/v1/live_events_controller.rb
canvas_sync-0.19.0.beta6 app/controllers/api/v1/live_events_controller.rb
canvas_sync-0.19.0.beta5 app/controllers/api/v1/live_events_controller.rb
canvas_sync-0.19.0.beta4 app/controllers/api/v1/live_events_controller.rb
canvas_sync-0.19.0.beta3 app/controllers/api/v1/live_events_controller.rb
canvas_sync-0.19.0.beta2 app/controllers/api/v1/live_events_controller.rb
canvas_sync-0.19.0.beta1 app/controllers/api/v1/live_events_controller.rb
canvas_sync-0.18.12 app/controllers/api/v1/live_events_controller.rb
canvas_sync-0.18.10 app/controllers/api/v1/live_events_controller.rb
canvas_sync-0.18.9 app/controllers/api/v1/live_events_controller.rb
canvas_sync-0.18.8 app/controllers/api/v1/live_events_controller.rb