1
0
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:
Kyle Spearrin
2016-06-29 21:59:18 -04:00
parent 84836fe89b
commit 2d6e0bd95a
21 changed files with 399 additions and 62 deletions

View File

@@ -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]