mirror of
https://github.com/discourse/discourse-subscriptions.git
synced 2025-03-07 01:59:35 +00:00
Co-authored-by: Jordan Vidrine <jordan@jordanvidrine.com> See https://github.com/discourse/discourse-subscriptions/pull/67 for the full description.
24 lines
480 B
Ruby
24 lines
480 B
Ruby
# frozen_string_literal: true
|
|
|
|
module DiscourseSubscriptions
|
|
class AdminController < ::Admin::AdminController
|
|
def index
|
|
head 200
|
|
end
|
|
|
|
def refresh_campaign
|
|
Jobs.enqueue(:manually_update_campaign_data)
|
|
render json: success_json
|
|
end
|
|
|
|
def create_campaign
|
|
begin
|
|
DiscourseSubscriptions::Campaign.new.create_campaign
|
|
render json: success_json
|
|
rescue => e
|
|
render_json_error e.message
|
|
end
|
|
end
|
|
end
|
|
end
|