Chatwoot/app/controllers/api/base_controller.rb

15 lines
367 B
Ruby
Raw Normal View History

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