1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-01 08:02:49 -05:00

[Soft Delete] - API updates for soft delete + retrieval

This commit is contained in:
Chad Scharf
2020-04-01 13:00:25 -04:00
parent fef512bad1
commit d014a597dd
28 changed files with 1279 additions and 122 deletions

View File

@ -205,6 +205,12 @@ namespace Bit.Core.Models.Api
public IEnumerable<string> Ids { get; set; }
}
public class CipherBulkRestoreRequestModel
{
[Required]
public IEnumerable<string> Ids { get; set; }
}
public class CipherBulkMoveRequestModel
{
[Required]

View File

@ -60,6 +60,7 @@ namespace Bit.Core.Models.Api
OrganizationId = cipher.OrganizationId?.ToString();
Attachments = AttachmentResponseModel.FromCipher(cipher, globalSettings);
OrganizationUseTotp = orgUseTotp;
DeletedDate = cipher.DeletedDate;
}
public string Id { get; set; }
@ -77,6 +78,7 @@ namespace Bit.Core.Models.Api
public IEnumerable<AttachmentResponseModel> Attachments { get; set; }
public bool OrganizationUseTotp { get; set; }
public DateTime RevisionDate { get; set; }
public DateTime? DeletedDate { get; set; }
}
public class CipherResponseModel : CipherMiniResponseModel

View File

@ -20,6 +20,7 @@ namespace Bit.Core.Models.Table
public string Attachments { get; set; }
public DateTime CreationDate { get; internal set; } = DateTime.UtcNow;
public DateTime RevisionDate { get; internal set; } = DateTime.UtcNow;
public DateTime? DeletedDate { get; internal set; }
public void SetNewId()
{