mirror of
https://github.com/bitwarden/server.git
synced 2025-04-06 21:48:12 -05:00
get updated cipher and used that in the response model (#4030)
This commit is contained in:
parent
ba4c2639b7
commit
cb55699d80
@ -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")]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user