From 5d09b7e38b42f19530d51feeeae0e57ad4320351 Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Fri, 20 Jul 2018 14:16:02 +0900 Subject: mark as read all -> mark all as read Close #855 --- src/server/api/common/read-notification.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/server/api/common/read-notification.ts') diff --git a/src/server/api/common/read-notification.ts b/src/server/api/common/read-notification.ts index fcebad6baa..3a1f4cfbde 100644 --- a/src/server/api/common/read-notification.ts +++ b/src/server/api/common/read-notification.ts @@ -5,7 +5,7 @@ import Mute from '../../../models/mute'; import User from '../../../models/user'; /** - * Mark as read notification(s) + * Mark notifications as read */ export default ( user: string | mongo.ObjectID, @@ -38,12 +38,12 @@ export default ( _id: { $in: ids }, isRead: false }, { - $set: { - isRead: true - } - }, { - multi: true - }); + $set: { + isRead: true + } + }, { + multi: true + }); // Calc count of my unread notifications const count = await Notification @@ -54,8 +54,8 @@ export default ( }, isRead: false }, { - limit: 1 - }); + limit: 1 + }); if (count == 0) { // Update flag -- cgit v1.2.3-freya