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