Initial Commit
Co-authored-by: Subin <subinthattaparambil@gmail.com> Co-authored-by: Manoj <manojmj92@gmail.com> Co-authored-by: Nithin <webofnithin@gmail.com>
This commit is contained in:
commit
2a34255e0b
537 changed files with 27318 additions and 0 deletions
14
app/controllers/api/base_controller.rb
Normal file
14
app/controllers/api/base_controller.rb
Normal file
|
@ -0,0 +1,14 @@
|
|||
class Api::BaseController < ApplicationController
|
||||
respond_to :json
|
||||
before_action :authenticate_user!
|
||||
rescue_from StandardError do |exception|
|
||||
Raven.capture_exception(exception)
|
||||
render json: { :error => "500 error", message: exception.message }.to_json , :status => 500
|
||||
end unless Rails.env.development?
|
||||
|
||||
private
|
||||
|
||||
def set_conversation
|
||||
@conversation ||= current_account.conversations.find_by(display_id: params[:conversation_id])
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue