Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-30 12:31:10 +01:00
18 Zeilen
502 B
Ruby
18 Zeilen
502 B
Ruby
# frozen_string_literal: true
|
|
class CustomWizard::SubscriptionController < ::Admin::AdminController
|
|
before_action :ensure_admin
|
|
|
|
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
|