mirror of
https://github.com/bitwarden/web
synced 2026-01-20 09:23:52 +00:00
update listing when cipher is edited
This commit is contained in:
@@ -88,8 +88,11 @@
|
||||
|
||||
editModel.result.then(function (returnVal) {
|
||||
if (returnVal.action === 'edit') {
|
||||
cipher.name = returnVal.data.name;
|
||||
cipher.subTitle = returnVal.data.login.username;
|
||||
var index = $scope.ciphers.indexOf(cipher);
|
||||
if (index > -1) {
|
||||
returnVal.data.collectionIds = $scope.ciphers[index].collectionIds;
|
||||
$scope.ciphers[index] = returnVal.data;
|
||||
}
|
||||
}
|
||||
else if (returnVal.action === 'delete') {
|
||||
var index = $scope.ciphers.indexOf(cipher);
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
var cipher = cipherService.encryptCipher(model, $scope.cipher.type);
|
||||
$scope.savePromise = apiService.ciphers.putAdmin({ id: cipherId }, cipher, function (cipherResponse) {
|
||||
$analytics.eventTrack('Edited Organization Cipher');
|
||||
var decCipher = cipherService.decryptCipher(cipherResponse);
|
||||
var decCipher = cipherService.decryptCipherPreview(cipherResponse);
|
||||
$uibModalInstance.close({
|
||||
action: 'edit',
|
||||
data: decCipher
|
||||
|
||||
Reference in New Issue
Block a user