Chatwoot/app/controllers/api/base_controller.rb
Tim Lange a2316d4d09
Chore: Added tests for subscriptions_controller (#483)
Added tests for subscriptions_controller
ref: #37
2020-02-17 07:51:45 +05:30

14 lines
367 B
Ruby

class Api::BaseController < ApplicationController
respond_to :json
before_action :authenticate_user!
private
def set_conversation
@conversation ||= current_account.conversations.find_by(display_id: params[:conversation_id])
end
def check_billing_enabled
raise ActionController::RoutingError, 'Not Found' unless ENV['BILLING_ENABLED']
end
end