mirror of
https://github.com/bitwarden/android.git
synced 2024-12-25 02:18:27 +03:00
Do not export items that have been deleted (#1200)
This commit is contained in:
parent
201191e96d
commit
bd3fdcab26
1 changed files with 3 additions and 2 deletions
|
@ -34,14 +34,15 @@ namespace Bit.Core.Services
|
|||
if (format == "encrypted_json")
|
||||
{
|
||||
var folders = (await _folderService.GetAllAsync()).Where(f => f.Id != null).Select(f => new FolderWithId(f));
|
||||
var items = (await _cipherService.GetAllAsync()).Where(c => c.OrganizationId == null).Select(c => new CipherWithId(c));
|
||||
var items = (await _cipherService.GetAllAsync()).Where(c => c.OrganizationId == null && c.DeletedDate == null)
|
||||
.Select(c => new CipherWithId(c));
|
||||
|
||||
return ExportEncryptedJson(folders, items);
|
||||
}
|
||||
else
|
||||
{
|
||||
var decryptedFolders = await _folderService.GetAllDecryptedAsync();
|
||||
var decryptedCiphers = await _cipherService.GetAllDecryptedAsync();
|
||||
var decryptedCiphers = (await _cipherService.GetAllDecryptedAsync()).Where(c => c.DeletedDate == null);
|
||||
|
||||
return format == "csv" ? ExportCsv(decryptedFolders, decryptedCiphers) : ExportJson(decryptedFolders, decryptedCiphers);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue