Skip to content

Commit

Permalink
fix(push-notifications): notifications count query being modified (#507)
Browse files Browse the repository at this point in the history
  • Loading branch information
kkopanidis committed Feb 6, 2023
1 parent 38e2f56 commit 31d297e
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ export class NotificationTokensHandler {
},
);

const countAll = { ...query };
delete countAll.read;
const notificationCount = await Notification.getInstance().countDocuments(countAll);
const notificationCount = await Notification.getInstance().countDocuments(query);
const unreadCount = await Notification.getInstance().countDocuments({
...query,
read: false,
Expand Down

0 comments on commit 31d297e

Please sign in to comment.