mirror of
https://github.com/streetwriters/notesnook-sync-server.git
synced 2026-07-09 20:28:35 +02:00
feat: get, add, & delete user's inbox api tokens (#50)
* feat: get, add, & delete user's inbox api tokens * inbox: generate inbox api key on the server * inbox: use nanoid to generate api key && set created date on server * inbox: set api key in constructor && increase default expiry date to 1 year
This commit is contained in:
@@ -84,6 +84,11 @@ namespace Streetwriters.Data.Repositories
|
||||
return all.ToList();
|
||||
}
|
||||
|
||||
public virtual async Task<long> CountAsync(Expression<Func<TEntity, bool>> filterExpression)
|
||||
{
|
||||
return await Collection.CountDocumentsAsync(filterExpression);
|
||||
}
|
||||
|
||||
public virtual void Update(string id, TEntity obj)
|
||||
{
|
||||
dbContext.AddCommand((handle, ct) => Collection.ReplaceOneAsync(handle, Builders<TEntity>.Filter.Eq("_id", ObjectId.Parse(id)), obj, cancellationToken: ct));
|
||||
|
||||
Reference in New Issue
Block a user