Skip to content
Snippets Groups Projects
Unverified Commit e4e668b3 authored by syuilo's avatar syuilo
Browse files

Improve performance

parent 8028c85c
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment