mirror of
https://github.com/bitwarden/server
synced 2025-12-11 13:53:40 +00:00
backwards compat for folders in cipher listing
This commit is contained in:
@@ -31,6 +31,21 @@ namespace Bit.Core.Models.Api
|
||||
}
|
||||
}
|
||||
|
||||
[Obsolete]
|
||||
public CipherMiniResponseModel(Folder folder, string obj = "cipherMini")
|
||||
: base(obj)
|
||||
{
|
||||
if(folder == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(folder));
|
||||
}
|
||||
|
||||
Id = folder.Id.ToString();
|
||||
Type = Enums.CipherType.Folder;
|
||||
RevisionDate = folder.RevisionDate;
|
||||
Data = new FolderDataModel(folder);
|
||||
}
|
||||
|
||||
public string Id { get; set; }
|
||||
public string OrganizationId { get; set; }
|
||||
public Enums.CipherType Type { get; set; }
|
||||
@@ -47,6 +62,11 @@ namespace Bit.Core.Models.Api
|
||||
Favorite = cipher.Favorite;
|
||||
}
|
||||
|
||||
[Obsolete]
|
||||
public CipherResponseModel(Folder folder, string obj = "cipher")
|
||||
: base(folder, obj)
|
||||
{ }
|
||||
|
||||
public string FolderId { get; set; }
|
||||
public bool Favorite { get; set; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user