1
0
mirror of https://github.com/bitwarden/mobile synced 2026-02-25 00:52:49 +00:00

add collection syncing

This commit is contained in:
Kyle Spearrin
2017-11-24 16:11:40 -05:00
parent 3b44ede67e
commit c9ceb09906
19 changed files with 302 additions and 21 deletions

View File

@@ -0,0 +1,21 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Bit.App.Abstractions;
using Bit.App.Models.Data;
namespace Bit.App.Repositories
{
public class CollectionRepository : Repository<CollectionData, string>, ICollectionRepository
{
public CollectionRepository(ISqlService sqlService)
: base(sqlService)
{ }
public Task<IEnumerable<CollectionData>> GetAllByUserIdAsync(string userId)
{
var folders = Connection.Table<CollectionData>().Where(f => f.UserId == userId).Cast<CollectionData>();
return Task.FromResult(folders);
}
}
}