mirror of
https://github.com/streetwriters/notesnook-sync-server.git
synced 2026-02-12 19:22:45 +00: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:
@@ -43,6 +43,7 @@ namespace Notesnook.API.Accessors
|
||||
public SyncItemsRepository Tags { get; }
|
||||
public Repository<UserSettings> UsersSettings { get; }
|
||||
public Repository<Monograph> Monographs { get; }
|
||||
public Repository<InboxApiKey> InboxApiKey { get; }
|
||||
|
||||
public SyncItemsRepositoryAccessor(IDbContext dbContext,
|
||||
|
||||
@@ -71,10 +72,12 @@ namespace Notesnook.API.Accessors
|
||||
[FromKeyedServices(Collections.TagsKey)]
|
||||
IMongoCollection<SyncItem> tags,
|
||||
|
||||
Repository<UserSettings> usersSettings, Repository<Monograph> monographs)
|
||||
Repository<UserSettings> usersSettings, Repository<Monograph> monographs,
|
||||
Repository<InboxApiKey> inboxApiKey)
|
||||
{
|
||||
UsersSettings = usersSettings;
|
||||
Monographs = monographs;
|
||||
InboxApiKey = inboxApiKey;
|
||||
Notebooks = new SyncItemsRepository(dbContext, notebooks);
|
||||
Notes = new SyncItemsRepository(dbContext, notes);
|
||||
Contents = new SyncItemsRepository(dbContext, content);
|
||||
|
||||
Reference in New Issue
Block a user