mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2025-01-10 23:51:01 -07:00
Improve performance
This commit is contained in:
parent
113e90f170
commit
b2215c8bdc
1 changed files with 5 additions and 1 deletions
|
@ -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 a new issue