about summary refs log tree commit diff
path: root/app/controllers/settings/two_factor_authentication/webauthn_credentials_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/settings/two_factor_authentication/webauthn_credentials_controller.rb')
-rw-r--r--app/controllers/settings/two_factor_authentication/webauthn_credentials_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/settings/two_factor_authentication/webauthn_credentials_controller.rb b/app/controllers/settings/two_factor_authentication/webauthn_credentials_controller.rb
index 7e2d43dcd..5a9029a42 100644
--- a/app/controllers/settings/two_factor_authentication/webauthn_credentials_controller.rb
+++ b/app/controllers/settings/two_factor_authentication/webauthn_credentials_controller.rb
@@ -27,7 +27,7 @@ module Settings
 
         session[:webauthn_challenge] = options_for_create.challenge
 
-        render json: options_for_create, status: :ok
+        render json: options_for_create, status: 200
       end
 
       def create
@@ -52,7 +52,7 @@ module Settings
             end
           else
             flash[:error] = I18n.t('webauthn_credentials.create.error')
-            status = :internal_server_error
+            status = :unprocessable_entity
           end
         else
           flash[:error] = t('webauthn_credentials.create.error')