discourse/app/controllers/wizard_controller.rb
Jarek Radosz fcb4e5a1a1
DEV: Make wizard an ember addon (#17027)
Co-authored-by: David Taylor <david@taylorhq.com>
2022-06-17 14:50:21 +02:00

22 lines
420 B
Ruby

# frozen_string_literal: true
class WizardController < ApplicationController
requires_login
before_action :ensure_admin
before_action :ensure_wizard_enabled
def index
respond_to do |format|
format.json do
wizard = Wizard::Builder.new(current_user).build
render_serialized(wizard, WizardSerializer)
end
format.html do
render body: nil
end
end
end
end