Improve performance
This commit is contained in:
parent
8028c85c67
commit
e4e668b327
@ -20,11 +20,15 @@ export default (
|
||||
: new mongo.ObjectID(note);
|
||||
|
||||
// Remove document
|
||||
await NoteUnread.remove({
|
||||
const res = await NoteUnread.remove({
|
||||
userId: userId,
|
||||
noteId: noteId
|
||||
});
|
||||
|
||||
if (res.deletedCount == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
const count1 = await NoteUnread
|
||||
.count({
|
||||
userId: userId,
|
||||
|
Loading…
Reference in New Issue
Block a user