mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-23 12:39:59 +01:00
Improve performance
This commit is contained in:
parent
113e90f170
commit
b2215c8bdc
@ -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