mirror of
https://github.com/streetwriters/notesnook-sync-server.git
synced 2026-10-01 18:49:42 +02:00
api: minor refactors aimed at improving memory consumption
This commit is contained in:
1 parent
579e65b0be
commit
ed6e3c56f2
3 files changed
+43
-58
No files matched your search
@@ -114,6 +114,9 @@ namespace Notesnook.API.Repositories
|
||||
throw new Exception($"Corrupted item \"{item.ItemId}\" in collection \"{this.collectionName}\". Please report this error to support@streetwriters.co.");
|
||||
}
|
||||
|
||||
if (item.ItemId == null)
|
||||
throw new Exception($"Item does not have an ItemId.");
|
||||
|
||||
item.DateSynced = dateSynced;
|
||||
item.UserId = userId;
|
||||
|
||||
@@ -148,6 +151,9 @@ namespace Notesnook.API.Repositories
|
||||
throw new Exception($"Corrupted item \"{item.ItemId}\" in collection \"{this.collectionName}\". Please report this error to support@streetwriters.co.");
|
||||
}
|
||||
|
||||
if (item.ItemId == null)
|
||||
throw new Exception($"Item does not have an ItemId.");
|
||||
|
||||
var filter = Builders<SyncItem>.Filter.And(
|
||||
userIdFilter,
|
||||
Builders<SyncItem>.Filter.Eq("ItemId", item.ItemId)
|
||||
|
||||
Reference in new issue
Block a user