From 3d5cdb8d2d60932caf1d29b0581c7d6243e06e37 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 28 Mar 2018 16:39:14 +0900 Subject: wip --- src/api/common/read-notification.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/api/common/read-notification.ts') diff --git a/src/api/common/read-notification.ts b/src/api/common/read-notification.ts index 3009cc5d08..5bbf136323 100644 --- a/src/api/common/read-notification.ts +++ b/src/api/common/read-notification.ts @@ -29,10 +29,10 @@ export default ( // Update documents await Notification.update({ _id: { $in: ids }, - is_read: false + isRead: false }, { $set: { - is_read: true + isRead: true } }, { multi: true @@ -41,8 +41,8 @@ export default ( // Calc count of my unread notifications const count = await Notification .count({ - notifiee_id: userId, - is_read: false + notifieeId: userId, + isRead: false }); if (count == 0) { -- cgit v1.2.3-freya