summaryrefslogtreecommitdiff
path: root/src/server/api/common/read-notification.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-05-14 09:24:49 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-05-14 09:24:49 +0900
commitf5d2cb5c61b4e749dbc4123d66bd84d8514109cb (patch)
treeef2a7eaaeeb52608d69e8c79e4b4accb22549119 /src/server/api/common/read-notification.ts
parent2.6.1 (diff)
downloadsharkey-f5d2cb5c61b4e749dbc4123d66bd84d8514109cb.tar.gz
sharkey-f5d2cb5c61b4e749dbc4123d66bd84d8514109cb.tar.bz2
sharkey-f5d2cb5c61b4e749dbc4123d66bd84d8514109cb.zip
Improve performance
Diffstat (limited to 'src/server/api/common/read-notification.ts')
-rw-r--r--src/server/api/common/read-notification.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/server/api/common/read-notification.ts b/src/server/api/common/read-notification.ts
index 9bd41519fb..7b9faf4cf4 100644
--- a/src/server/api/common/read-notification.ts
+++ b/src/server/api/common/read-notification.ts
@@ -43,6 +43,8 @@ export default (
.count({
notifieeId: userId,
isRead: false
+ }, {
+ limit: 1
});
if (count == 0) {