Class: Api::V1::Resources::ContextLoggerController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/api/v1/resources/context_logger_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



5
6
7
8
9
10
11
12
# File 'app/controllers/api/v1/resources/context_logger_controller.rb', line 5

def index
    if(params[:action_id].nil?)
      render plain: 'Missing mandatory parameter action_id', :status => 400, layout: false
      return
    end
    #TODO: add pagination
    render json: ::ContextLog.where(action_id: params[:action_id]).all
end