mirror of
https://github.com/bitwarden/server
synced 2025-12-17 08:43:27 +00:00
get updated cipher and used that in the response model (#4030)
This commit is contained in:
@@ -573,8 +573,9 @@ public class CiphersController : Controller
|
|||||||
await _cipherService.SaveCollectionsAsync(cipher,
|
await _cipherService.SaveCollectionsAsync(cipher,
|
||||||
model.CollectionIds.Select(c => new Guid(c)), userId, false);
|
model.CollectionIds.Select(c => new Guid(c)), userId, false);
|
||||||
|
|
||||||
|
var updatedCipher = await GetByIdAsync(id, userId);
|
||||||
var collectionCiphers = await _collectionCipherRepository.GetManyByUserIdCipherIdAsync(userId, id, UseFlexibleCollections);
|
var collectionCiphers = await _collectionCipherRepository.GetManyByUserIdCipherIdAsync(userId, id, UseFlexibleCollections);
|
||||||
return new CipherDetailsResponseModel(cipher, _globalSettings, collectionCiphers);
|
return new CipherDetailsResponseModel(updatedCipher, _globalSettings, collectionCiphers);
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPut("{id}/collections-admin")]
|
[HttpPut("{id}/collections-admin")]
|
||||||
|
|||||||
Reference in New Issue
Block a user