From cb55699d8006c90ba32f4cccb47de1d472b431a2 Mon Sep 17 00:00:00 2001 From: SmithThe4th Date: Mon, 29 Apr 2024 16:12:42 -0400 Subject: [PATCH] get updated cipher and used that in the response model (#4030) --- src/Api/Vault/Controllers/CiphersController.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Api/Vault/Controllers/CiphersController.cs b/src/Api/Vault/Controllers/CiphersController.cs index 7baaaa9274..cfff7b2577 100644 --- a/src/Api/Vault/Controllers/CiphersController.cs +++ b/src/Api/Vault/Controllers/CiphersController.cs @@ -573,8 +573,9 @@ public class CiphersController : Controller await _cipherService.SaveCollectionsAsync(cipher, model.CollectionIds.Select(c => new Guid(c)), userId, false); + var updatedCipher = await GetByIdAsync(id, userId); var collectionCiphers = await _collectionCipherRepository.GetManyByUserIdCipherIdAsync(userId, id, UseFlexibleCollections); - return new CipherDetailsResponseModel(cipher, _globalSettings, collectionCiphers); + return new CipherDetailsResponseModel(updatedCipher, _globalSettings, collectionCiphers); } [HttpPut("{id}/collections-admin")]