2019-05-02 17:17:27 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-08-25 12:14:56 -05:00
|
|
|
class WizardController < ApplicationController
|
2022-06-17 07:50:21 -05:00
|
|
|
requires_login
|
2018-01-31 22:17:59 -06:00
|
|
|
|
2022-06-17 07:50:21 -05:00
|
|
|
before_action :ensure_admin
|
|
|
|
before_action :ensure_wizard_enabled
|
2016-08-25 12:14:56 -05:00
|
|
|
|
|
|
|
def index
|
|
|
|
respond_to do |format|
|
|
|
|
format.json do
|
2016-09-09 15:51:07 -05:00
|
|
|
wizard = Wizard::Builder.new(current_user).build
|
2016-08-25 12:14:56 -05:00
|
|
|
render_serialized(wizard, WizardSerializer)
|
|
|
|
end
|
|
|
|
|
2023-01-09 06:20:10 -06:00
|
|
|
format.html { render body: nil }
|
2022-06-17 07:50:21 -05:00
|
|
|
end
|
2016-08-25 12:14:56 -05:00
|
|
|
end
|
|
|
|
end
|