mirror of
https://github.com/bitwarden/server
synced 2026-01-05 01:53:17 +00:00
[PM-22204] - update cipher/share endpoint to return revision date (#5900)
* return ciper response model in cipher share endpoint. add tests * return dict instead of full cipher response. adjust specs * rename vars * rename vars * rename vars * reinsert braces * add specs * return CipherMiniResponseModel
This commit is contained in:
@@ -24,7 +24,7 @@ public interface ICipherService
|
||||
Task DeleteFolderAsync(Folder folder);
|
||||
Task ShareAsync(Cipher originalCipher, Cipher cipher, Guid organizationId, IEnumerable<Guid> collectionIds,
|
||||
Guid userId, DateTime? lastKnownRevisionDate);
|
||||
Task ShareManyAsync(IEnumerable<(Cipher cipher, DateTime? lastKnownRevisionDate)> ciphers, Guid organizationId,
|
||||
Task<IEnumerable<Cipher>> ShareManyAsync(IEnumerable<(Cipher cipher, DateTime? lastKnownRevisionDate)> ciphers, Guid organizationId,
|
||||
IEnumerable<Guid> collectionIds, Guid sharingUserId);
|
||||
Task SaveCollectionsAsync(Cipher cipher, IEnumerable<Guid> collectionIds, Guid savingUserId, bool orgAdmin);
|
||||
Task SoftDeleteAsync(CipherDetails cipherDetails, Guid deletingUserId, bool orgAdmin = false);
|
||||
|
||||
@@ -628,7 +628,7 @@ public class CipherService : ICipherService
|
||||
await _pushService.PushSyncCipherUpdateAsync(cipher, collectionIds);
|
||||
}
|
||||
|
||||
public async Task ShareManyAsync(IEnumerable<(Cipher cipher, DateTime? lastKnownRevisionDate)> cipherInfos,
|
||||
public async Task<IEnumerable<Cipher>> ShareManyAsync(IEnumerable<(Cipher cipher, DateTime? lastKnownRevisionDate)> cipherInfos,
|
||||
Guid organizationId, IEnumerable<Guid> collectionIds, Guid sharingUserId)
|
||||
{
|
||||
var cipherIds = new List<Guid>();
|
||||
@@ -655,6 +655,7 @@ public class CipherService : ICipherService
|
||||
|
||||
// push
|
||||
await _pushService.PushSyncCiphersAsync(sharingUserId);
|
||||
return cipherInfos.Select(c => c.cipher);
|
||||
}
|
||||
|
||||
public async Task SaveCollectionsAsync(Cipher cipher, IEnumerable<Guid> collectionIds, Guid savingUserId,
|
||||
|
||||
Reference in New Issue
Block a user