Chatwoot/app/controllers/api/v1/widget/campaigns_controller.rb
Sojan Jose 98e2a9b8b5
feat: Builder for creating Campaign conversations (#2192)
- Builder for creating Campaign conversations
- Widget endpoint to fetch the campaigns
2021-05-03 20:23:09 +05:30

13 lines
275 B
Ruby

class Api::V1::Widget::CampaignsController < Api::V1::Widget::BaseController
skip_before_action :set_contact
def index
@campaigns = @web_widget.inbox.campaigns.where(enabled: true)
end
private
def permitted_params
params.permit(:website_token)
end
end