mirror of
https://github.com/streetwriters/notesnook-sync-server.git
synced 2026-09-30 18:29:36 +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:
1 parent
4a0aee1c44
commit
9b774d640c
9 files changed
+207
-5
No files matched your search
@@ -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