Chatwoot/app/controllers/api/v1/widget/campaigns_controller.rb
Sojan Jose a0886d37bc
chore: Expose widget config via an API (#2645)
Expose widget config via an API so that the UI could be detached from the rails Application.
2021-07-21 01:26:32 +05:30

7 lines
200 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
end