From 29cbe48eb5cb8289b783e2300360db5f983bfd9b Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 27 Jun 2017 08:26:00 -0400 Subject: [PATCH] lint fixes --- src/app/accounts/accountsLoginController.js | 11 ++++++----- src/app/settings/settingsSessionsController.js | 2 +- .../settingsTwoStepAuthenticatorController.js | 4 ++-- src/app/settings/settingsTwoStepController.js | 3 +-- src/app/settings/settingsTwoStepYubiController.js | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/app/accounts/accountsLoginController.js b/src/app/accounts/accountsLoginController.js index 34fe54ae71..f371e0f6ab 100644 --- a/src/app/accounts/accountsLoginController.js +++ b/src/app/accounts/accountsLoginController.js @@ -98,8 +98,8 @@ angular } $scope.twoFactor = function (token) { - if ($scope.twoFactorProvider === constants.twoFactorProvider.email - || $scope.twoFactorProvider === constants.twoFactorProvider.authenticator) { + if ($scope.twoFactorProvider === constants.twoFactorProvider.email || + $scope.twoFactorProvider === constants.twoFactorProvider.authenticator) { token = token.replace(' ', ''); } @@ -164,8 +164,9 @@ angular } function init() { + var params; if ($scope.twoFactorProvider === constants.twoFactorProvider.duo) { - var params = $scope.twoFactorProviders[constants.twoFactorProvider.duo]; + params = $scope.twoFactorProviders[constants.twoFactorProvider.duo]; $window.Duo.init({ host: params.Host, @@ -177,13 +178,13 @@ angular }); } else if ($scope.twoFactorProvider === constants.twoFactorProvider.u2f) { - var params = $scope.twoFactorProviders[constants.twoFactorProvider.u2f]; + params = $scope.twoFactorProviders[constants.twoFactorProvider.u2f]; var challenges = JSON.parse(params.Challenges); initU2f(challenges); } else if ($scope.twoFactorProvider === constants.twoFactorProvider.email) { - var params = $scope.twoFactorProviders[constants.twoFactorProvider.email]; + params = $scope.twoFactorProviders[constants.twoFactorProvider.email]; $scope.twoFactorEmail = params.Email; if (Object.keys($scope.twoFactorProviders).length > 1) { $scope.sendEmail(false); diff --git a/src/app/settings/settingsSessionsController.js b/src/app/settings/settingsSessionsController.js index 2db544b214..493dc1155f 100644 --- a/src/app/settings/settingsSessionsController.js +++ b/src/app/settings/settingsSessionsController.js @@ -11,7 +11,7 @@ $scope.submitPromise = authService.getUserProfile().then(function (profile) { - apiService.accounts.putSecurityStamp(request, function () { + return apiService.accounts.putSecurityStamp(request, function () { $uibModalInstance.dismiss('cancel'); authService.logOut(); tokenService.clearTwoFactorToken(profile.email); diff --git a/src/app/settings/settingsTwoStepAuthenticatorController.js b/src/app/settings/settingsTwoStepAuthenticatorController.js index 97eb22cb43..f7e22da3d5 100644 --- a/src/app/settings/settingsTwoStepAuthenticatorController.js +++ b/src/app/settings/settingsTwoStepAuthenticatorController.js @@ -6,8 +6,8 @@ $analytics.eventTrack('settingsTwoStepAuthenticatorController', { category: 'Modal' }); var _issuer = 'bitwarden', _profile = null, - _masterPasswordHash - _key = null; + _masterPasswordHash, + _key = null; $scope.auth = function (model) { _masterPasswordHash = cryptoService.hashPassword(model.masterPassword); diff --git a/src/app/settings/settingsTwoStepController.js b/src/app/settings/settingsTwoStepController.js index fdebc22bf7..4ca68d108c 100644 --- a/src/app/settings/settingsTwoStepController.js +++ b/src/app/settings/settingsTwoStepController.js @@ -56,11 +56,10 @@ }; $scope.viewRecover = function () { - var modal = $uibModal.open({ animation: true, templateUrl: 'app/settings/views/settingsTwoStepRecover.html', controller: 'settingsTwoStepRecoverController' }); - } + }; }); diff --git a/src/app/settings/settingsTwoStepYubiController.js b/src/app/settings/settingsTwoStepYubiController.js index a9f606c74b..c21a12011d 100644 --- a/src/app/settings/settingsTwoStepYubiController.js +++ b/src/app/settings/settingsTwoStepYubiController.js @@ -62,7 +62,7 @@ toastr.error('Failed to disable.'); $scope.disableLoading = false; }).$promise; - } + }; function processResult(response) { $scope.enabled = response.Enabled;