resolve lint errors

This commit is contained in:
Kyle Spearrin 2017-04-03 09:30:21 -04:00
parent bf9414199c
commit e00f033ffd
2 changed files with 7 additions and 6 deletions

View File

@ -57,7 +57,7 @@ angular
}
};
_service.addOrgKey = function (orgId, orgKey, privateKey) {
_service.addOrgKey = function (orgId, encOrgKey, privateKey) {
_orgKeys = _service.getOrgKeys();
if (!_orgKeys) {
_orgKeys = {};
@ -69,9 +69,9 @@ angular
}
try {
var orgKey = _service.rsaDecrypt(orgKey, privateKey);
_orgKeys[orgId] = orgKey;
orgKeysb64[orgId] = forge.util.encode64(orgKey);
var decOrgKey = _service.rsaDecrypt(encOrgKey, privateKey);
_orgKeys[orgId] = decOrgKey;
orgKeysb64[orgId] = forge.util.encode64(decOrgKey);
}
catch (e) {
_orgKeys = null;

View File

@ -60,8 +60,9 @@
});
editModel.result.then(function (returnVal) {
var loginToUpdate;
if (returnVal.action === 'edit') {
var loginToUpdate = $filter('filter')($scope.logins, { id: returnVal.data.id }, true);
loginToUpdate = $filter('filter')($scope.logins, { id: returnVal.data.id }, true);
if (loginToUpdate && loginToUpdate.length > 0) {
loginToUpdate[0].folderId = returnVal.data.folderId;
loginToUpdate[0].name = returnVal.data.name;
@ -70,7 +71,7 @@
}
}
else if (returnVal.action === 'partialEdit') {
var loginToUpdate = $filter('filter')($scope.logins, { id: returnVal.data.id }, true);
loginToUpdate = $filter('filter')($scope.logins, { id: returnVal.data.id }, true);
if (loginToUpdate && loginToUpdate.length > 0) {
loginToUpdate[0].folderId = returnVal.data.folderId;
loginToUpdate[0].favorite = returnVal.data.favorite;