Chatwoot/app/controllers/api/v1/accounts/contacts/base_controller.rb

10 lines
227 B
Ruby
Raw Normal View History

2021-10-24 07:10:30 +00:00
class Api::V1::Accounts::Contacts::BaseController < Api::V1::Accounts::BaseController
before_action :ensure_contact
private
def ensure_contact
@contact = Current.account.contacts.find(params[:contact_id])
end
end