Class: Chronicle::ErrorLogsController

Inherits:
ResourceController show all
Defined in:
app/controllers/chronicle/error_logs_controller.rb

Constant Summary collapse

FILTER_DEFINITION =
{
  request_id: :exact,
  backend_version: :exact,
  client_version: :exact,
  user_id: :exact,
  error_group_id: :exact,
  start_date: :date_range,
  end_date: :date_range,
}.freeze

Constants included from Pagination

Pagination::DEFAULT_LIMIT, Pagination::MAX_LIMIT

Instance Method Summary collapse

Methods inherited from ResourceController

#index

Methods included from Filterable

#build_query

Methods included from Pagination

#paginate

Instance Method Details

#destroyObject



23
24
25
26
# File 'app/controllers/chronicle/error_logs_controller.rb', line 23

def destroy
  @error_log.destroy
  render status: :no_content
end

#showObject

Raises:



16
17
18
19
20
21
# File 'app/controllers/chronicle/error_logs_controller.rb', line 16

def show
  record = ErrorLog.find_by(id: params[:id])
  raise NotFoundError, 'Error log not found' unless record

  render json: record.get_hash, status: :ok
end