feat: Add APIs for Campaigns (#2175)

This commit is contained in:
Sojan Jose
2021-04-29 22:23:32 +05:30
committed by GitHub
parent 3afc9b5f5b
commit b89cc9cf57
23 changed files with 452 additions and 1 deletions

View File

@@ -11,6 +11,10 @@ class Api::V1::Accounts::InboxesController < Api::V1::Accounts::BaseController
@assignable_agents = (Current.account.users.where(id: @inbox.members.select(:user_id)) + Current.account.administrators).uniq
end
def campaigns
@campaigns = @inbox.campaigns
end
def create
ActiveRecord::Base.transaction do
channel = create_channel