Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-26 19:10:29 +01:00
066eef4ef8
The "Transfer" UI has been upgraded into a full wizard manager, adding additional import/export features and bulk-delete functionality
22 Zeilen
Kein EOL
540 B
Ruby
22 Zeilen
Kein EOL
540 B
Ruby
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)
|
|
raise Discourse::InvalidParameters.new(:wizard_id) unless @wizard
|
|
end
|
|
|
|
def custom_field_list
|
|
serialize_data(CustomWizard::CustomField.list, CustomWizard::CustomFieldSerializer)
|
|
end
|
|
|
|
def render_error(message)
|
|
render json: failed_json.merge(error: message)
|
|
end
|
|
end |