1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-11-04 08:50:18 +01:00

data model updates

This commit is contained in:
Kyle Spearrin 2019-04-16 11:09:05 -04:00
parent 351c99fb42
commit f76051d362
2 changed files with 4 additions and 5 deletions

View File

@ -1,5 +1,4 @@
using Bit.Core.Models.Api;
using Bit.Core.Models.Response;
using Bit.Core.Models.Response;
using System;
using System.Collections.Generic;
using System.Linq;
@ -10,7 +9,7 @@ namespace Bit.Core.Models.Data
{
public CipherData() { }
public CipherData(CipherResponse response, string userId = null, List<string> collectionIds = null)
public CipherData(CipherResponse response, string userId = null, HashSet<string> collectionIds = null)
{
Id = response.Id;
OrganizationId = response.OrganizationId;
@ -23,7 +22,7 @@ namespace Bit.Core.Models.Data
Type = response.Type;
Name = response.Name;
Notes = response.Notes;
CollectionIds = collectionIds != null ? collectionIds : response.CollectionIds;
CollectionIds = collectionIds?.ToList() ?? response.CollectionIds;
switch(Type)
{

View File

@ -4,7 +4,7 @@ namespace Bit.Core.Models.Data
{
public class CollectionData : Data
{
public CollectionData(CollectionResponse response)
public CollectionData(CollectionDetailsResponse response)
{
Id = response.Id;
OrganizationId = response.OrganizationId;