From 6125bd981e653f34848f458627bd6df01040a9ad Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Sat, 9 Jul 2022 18:18:39 +0900 Subject: [PATCH] Fix Attempts to update all notifications (#8974) * Fix massive update notification parameters * CHANGELOG * CHANGELOG --- CHANGELOG.md | 1 + packages/backend/src/server/api/common/read-notification.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29f91596c..cfd54f74d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ You should also include the user name that made the change. - Make active email validation configurable ### Bugfixes +- Server: Fix Attempts to update all notifications @mei23 ## 12.112.2 (2022/07/08) diff --git a/packages/backend/src/server/api/common/read-notification.ts b/packages/backend/src/server/api/common/read-notification.ts index 8c4ba41a3..17dd8e6f0 100644 --- a/packages/backend/src/server/api/common/read-notification.ts +++ b/packages/backend/src/server/api/common/read-notification.ts @@ -27,7 +27,7 @@ export async function readNotificationByQuery( userId: User['id'], query: Record ) { - const notificationIds = await Notifications.find({ + const notificationIds = await Notifications.findBy({ ...query, notifieeId: userId, isRead: false,