lint fixes

This commit is contained in:
Kyle Spearrin 2017-06-27 08:26:00 -04:00
parent be1cc945a2
commit 29cbe48eb5
5 changed files with 11 additions and 11 deletions

View File

@ -98,8 +98,8 @@ angular
} }
$scope.twoFactor = function (token) { $scope.twoFactor = function (token) {
if ($scope.twoFactorProvider === constants.twoFactorProvider.email if ($scope.twoFactorProvider === constants.twoFactorProvider.email ||
|| $scope.twoFactorProvider === constants.twoFactorProvider.authenticator) { $scope.twoFactorProvider === constants.twoFactorProvider.authenticator) {
token = token.replace(' ', ''); token = token.replace(' ', '');
} }
@ -164,8 +164,9 @@ angular
} }
function init() { function init() {
var params;
if ($scope.twoFactorProvider === constants.twoFactorProvider.duo) { if ($scope.twoFactorProvider === constants.twoFactorProvider.duo) {
var params = $scope.twoFactorProviders[constants.twoFactorProvider.duo]; params = $scope.twoFactorProviders[constants.twoFactorProvider.duo];
$window.Duo.init({ $window.Duo.init({
host: params.Host, host: params.Host,
@ -177,13 +178,13 @@ angular
}); });
} }
else if ($scope.twoFactorProvider === constants.twoFactorProvider.u2f) { 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); var challenges = JSON.parse(params.Challenges);
initU2f(challenges); initU2f(challenges);
} }
else if ($scope.twoFactorProvider === constants.twoFactorProvider.email) { else if ($scope.twoFactorProvider === constants.twoFactorProvider.email) {
var params = $scope.twoFactorProviders[constants.twoFactorProvider.email]; params = $scope.twoFactorProviders[constants.twoFactorProvider.email];
$scope.twoFactorEmail = params.Email; $scope.twoFactorEmail = params.Email;
if (Object.keys($scope.twoFactorProviders).length > 1) { if (Object.keys($scope.twoFactorProviders).length > 1) {
$scope.sendEmail(false); $scope.sendEmail(false);

View File

@ -11,7 +11,7 @@
$scope.submitPromise = $scope.submitPromise =
authService.getUserProfile().then(function (profile) { authService.getUserProfile().then(function (profile) {
apiService.accounts.putSecurityStamp(request, function () { return apiService.accounts.putSecurityStamp(request, function () {
$uibModalInstance.dismiss('cancel'); $uibModalInstance.dismiss('cancel');
authService.logOut(); authService.logOut();
tokenService.clearTwoFactorToken(profile.email); tokenService.clearTwoFactorToken(profile.email);

View File

@ -6,8 +6,8 @@
$analytics.eventTrack('settingsTwoStepAuthenticatorController', { category: 'Modal' }); $analytics.eventTrack('settingsTwoStepAuthenticatorController', { category: 'Modal' });
var _issuer = 'bitwarden', var _issuer = 'bitwarden',
_profile = null, _profile = null,
_masterPasswordHash _masterPasswordHash,
_key = null; _key = null;
$scope.auth = function (model) { $scope.auth = function (model) {
_masterPasswordHash = cryptoService.hashPassword(model.masterPassword); _masterPasswordHash = cryptoService.hashPassword(model.masterPassword);

View File

@ -56,11 +56,10 @@
}; };
$scope.viewRecover = function () { $scope.viewRecover = function () {
var modal = $uibModal.open({ var modal = $uibModal.open({
animation: true, animation: true,
templateUrl: 'app/settings/views/settingsTwoStepRecover.html', templateUrl: 'app/settings/views/settingsTwoStepRecover.html',
controller: 'settingsTwoStepRecoverController' controller: 'settingsTwoStepRecoverController'
}); });
} };
}); });

View File

@ -62,7 +62,7 @@
toastr.error('Failed to disable.'); toastr.error('Failed to disable.');
$scope.disableLoading = false; $scope.disableLoading = false;
}).$promise; }).$promise;
} };
function processResult(response) { function processResult(response) {
$scope.enabled = response.Enabled; $scope.enabled = response.Enabled;