summaryrefslogtreecommitdiff
path: root/app/controllers/profiles
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2017-06-23 19:00:22 +0200
committerJames Lopez <james@jameslopez.es>2017-06-23 19:00:22 +0200
commitefb3d5e70f163bfd186fa3a02c967154103d27f4 (patch)
treee6a10e17d40f8ad0c02f4a770383d462438a223e /app/controllers/profiles
parentb33c638483d6b87ba71a329275ff12e5eb865d72 (diff)
downloadgitlab-ce-efb3d5e70f163bfd186fa3a02c967154103d27f4.tar.gz
fix spec failures
Diffstat (limited to 'app/controllers/profiles')
-rw-r--r--app/controllers/profiles/two_factor_auths_controller.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/controllers/profiles/two_factor_auths_controller.rb b/app/controllers/profiles/two_factor_auths_controller.rb
index a864f86f3dd..1a4f77639e7 100644
--- a/app/controllers/profiles/two_factor_auths_controller.rb
+++ b/app/controllers/profiles/two_factor_auths_controller.rb
@@ -41,10 +41,8 @@ class Profiles::TwoFactorAuthsController < Profiles::ApplicationController
def create
if current_user.validate_and_consume_otp!(params[:pin_code])
- codes = nil
-
Users::UpdateService.new(current_user, otp_required_for_login: true).execute! do |user|
- codes = user.generate_otp_backup_codes!
+ @codes = user.generate_otp_backup_codes!
end
render 'create'