mirror of
https://github.com/bitwarden/android.git
synced 2024-10-31 23:25:45 +03:00
data model updates
This commit is contained in:
parent
351c99fb42
commit
f76051d362
2 changed files with 4 additions and 5 deletions
|
@ -1,5 +1,4 @@
|
||||||
using Bit.Core.Models.Api;
|
using Bit.Core.Models.Response;
|
||||||
using Bit.Core.Models.Response;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
@ -10,7 +9,7 @@ namespace Bit.Core.Models.Data
|
||||||
{
|
{
|
||||||
public CipherData() { }
|
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;
|
Id = response.Id;
|
||||||
OrganizationId = response.OrganizationId;
|
OrganizationId = response.OrganizationId;
|
||||||
|
@ -23,7 +22,7 @@ namespace Bit.Core.Models.Data
|
||||||
Type = response.Type;
|
Type = response.Type;
|
||||||
Name = response.Name;
|
Name = response.Name;
|
||||||
Notes = response.Notes;
|
Notes = response.Notes;
|
||||||
CollectionIds = collectionIds != null ? collectionIds : response.CollectionIds;
|
CollectionIds = collectionIds?.ToList() ?? response.CollectionIds;
|
||||||
|
|
||||||
switch(Type)
|
switch(Type)
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,7 +4,7 @@ namespace Bit.Core.Models.Data
|
||||||
{
|
{
|
||||||
public class CollectionData : Data
|
public class CollectionData : Data
|
||||||
{
|
{
|
||||||
public CollectionData(CollectionResponse response)
|
public CollectionData(CollectionDetailsResponse response)
|
||||||
{
|
{
|
||||||
Id = response.Id;
|
Id = response.Id;
|
||||||
OrganizationId = response.OrganizationId;
|
OrganizationId = response.OrganizationId;
|
||||||
|
|
Loading…
Reference in a new issue