0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-14 22:02:53 +01:00
discourse-custom-wizard/app/controllers/custom_wizard/admin/user.rb
2024-10-17 16:15:25 +02:00

17 Zeilen
421 B
Ruby

# frozen_string_literal: true
class CustomWizard::UserController < ::Admin::AdminController
before_action :ensure_admin
requires_plugin "discourse-custom-wizard"
def clear_redirect
user = User.find_by(id: params[:id])
if user
user.custom_fields["redirect_to_wizard"] = nil
user.save_custom_fields(true)
render json: success_json
else
render json: failed_json
end
end
end