Skip to content

Commit

Permalink
get updated cipher and used that in the response model (#4030)
Browse files Browse the repository at this point in the history
(cherry picked from commit cb55699)
  • Loading branch information
gbubemismith committed Apr 29, 2024
1 parent 7523819 commit 1e3e937
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Api/Vault/Controllers/CiphersController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -573,8 +573,9 @@ public async Task<CipherDetailsResponseModel> PutCollections(Guid id, [FromBody]
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")]
Expand Down

0 comments on commit 1e3e937

Please sign in to comment.