Chatwoot/app/controllers/api/v1/accounts/kbase/base_controller.rb
Subin T P 701eccb35c
Feature: Knowledge Base APIs (#1002)
- Introduce models & migrations for portals, categories, folders and articles
- CRUD API for portals
- CRUD API for categories

Addresses: #714

Co-authored-by: Sojan <sojan@pepalo.com>
2020-09-26 02:32:34 +05:30

9 lines
220 B
Ruby

class Api::V1::Accounts::Kbase::BaseController < Api::V1::Accounts::BaseController
before_action :portal
private
def portal
@portal ||= Current.account.kbase_portals.find_by(id: params[:portal_id])
end
end