diff options
Diffstat (limited to 'app/controllers/profiles/webauthn_registrations_controller.rb')
-rw-r--r-- | app/controllers/profiles/webauthn_registrations_controller.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/controllers/profiles/webauthn_registrations_controller.rb b/app/controllers/profiles/webauthn_registrations_controller.rb index 345d7bdbca8..ef3144f6f8c 100644 --- a/app/controllers/profiles/webauthn_registrations_controller.rb +++ b/app/controllers/profiles/webauthn_registrations_controller.rb @@ -4,8 +4,7 @@ class Profiles::WebauthnRegistrationsController < Profiles::ApplicationControlle feature_category :system_access def destroy - webauthn_registration = current_user.webauthn_registrations.find(params[:id]) - webauthn_registration.destroy + Webauthn::DestroyService.new(current_user, current_user, params[:id]).execute redirect_to profile_two_factor_auth_path, status: :found, notice: _("Successfully deleted WebAuthn device.") end |