Class: CanvasSync::Api::V1::LiveEventsController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/canvas_sync/api/v1/live_events_controller.rb

Instance Method Summary collapse

Instance Method Details

#process_eventObject



6
7
8
9
10
11
12
13
14
15
# File 'app/controllers/canvas_sync/api/v1/live_events_controller.rb', line 6

def process_event
  if params[:payload].present?
    process_eventsmanager_event
  else
    process_dataservices_event
  end
rescue => e
  Rails.logger.error("Live Events Error: #{e.message} - #{e.backtrace}")
  render json: { error: "Live Events Error: #{e.message}" }, status: 422
end