2020-04-13 14:17:22 +02:00
|
|
|
class CustomWizard::AdminController < ::Admin::AdminController
|
|
|
|
before_action :ensure_admin
|
|
|
|
|
|
|
|
def index
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def find_wizard
|
|
|
|
params.require(:wizard_id)
|
|
|
|
@wizard = CustomWizard::Wizard.create(params[:wizard_id].underscore)
|
2020-11-03 01:24:20 +01:00
|
|
|
raise Discourse::InvalidParameters.new(:wizard_id) unless @wizard
|
2020-04-13 14:17:22 +02:00
|
|
|
end
|
2020-10-20 07:40:23 +02:00
|
|
|
|
|
|
|
def custom_field_list
|
|
|
|
serialize_data(CustomWizard::CustomField.list, CustomWizard::CustomFieldSerializer)
|
|
|
|
end
|
2020-04-13 14:17:22 +02:00
|
|
|
end
|