0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-24 18:30:27 +01:00
discourse-custom-wizard/app/controllers/custom_wizard/admin/subscription.rb
2024-10-16 14:18:23 +02:00

19 Zeilen
546 B
Ruby

# frozen_string_literal: true
class CustomWizard::SubscriptionController < ::Admin::AdminController
before_action :ensure_admin
requires_plugin "discourse-custom-wizard"
def index
if params[:update_from_remote]
subscription = CustomWizard::Subscription.new(true)
else
subscription = CustomWizard::Subscription.new
end
render_json_dump(
subscribed: subscription.subscribed?,
subscription_type: subscription.type,
subscription_attributes: CustomWizard::Subscription.attributes,
)
end
end