mirror of
https://github.com/bitwarden/mobile
synced 2025-12-16 08:13:20 +00:00
Cipher api repository and various sync operations from push notifications.
This commit is contained in:
@@ -25,6 +25,24 @@ namespace Bit.App.Models.Data
|
||||
Name = folder.Name;
|
||||
}
|
||||
|
||||
public FolderData(CipherResponse cipher, string userId)
|
||||
{
|
||||
if(cipher.Type != Enums.CipherType.Folder)
|
||||
{
|
||||
throw new ArgumentException(nameof(cipher.Type));
|
||||
}
|
||||
|
||||
var data = cipher.Data as FolderDataModel;
|
||||
if(data == null)
|
||||
{
|
||||
throw new ArgumentException(nameof(cipher.Data));
|
||||
}
|
||||
|
||||
Id = cipher.Id;
|
||||
UserId = userId;
|
||||
Name = data.Name;
|
||||
}
|
||||
|
||||
[PrimaryKey]
|
||||
public string Id { get; set; }
|
||||
[Indexed]
|
||||
|
||||
Reference in New Issue
Block a user