mirror of
https://github.com/bitwarden/mobile
synced 2026-02-25 00:52:49 +00:00
add collection syncing
This commit is contained in:
21
src/App/Repositories/CollectionRepository.cs
Normal file
21
src/App/Repositories/CollectionRepository.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user