api: minor refactors aimed at improving memory consumption
This commit is contained in:
committed by
Abdullah Atta
parent
579e65b0be
commit
ed6e3c56f2
@@ -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