2019-08-14 09:48:44 +00:00
|
|
|
class Api::BaseController < ApplicationController
|
|
|
|
respond_to :json
|
|
|
|
before_action :authenticate_user!
|
2019-10-20 08:47:26 +00:00
|
|
|
unless Rails.env.development?
|
|
|
|
rescue_from StandardError do |exception|
|
|
|
|
Raven.capture_exception(exception)
|
|
|
|
render json: { error: '500 error', message: exception.message }.to_json, status: 500
|
|
|
|
end
|
|
|
|
end
|
2019-08-14 09:48:44 +00:00
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def set_conversation
|
|
|
|
@conversation ||= current_account.conversations.find_by(display_id: params[:conversation_id])
|
|
|
|
end
|
|
|
|
end
|