Improve performance

This commit is contained in:
syuilo 2018-05-14 09:24:49 +09:00
parent 4f686f45e2
commit 5dbc9a1ac8
2 changed files with 4 additions and 0 deletions

View file

@ -57,6 +57,8 @@ export default (
.count({
recipientId: userId,
isRead: false
}, {
limit: 1
});
if (count == 0) {

View file

@ -43,6 +43,8 @@ export default (
.count({
notifieeId: userId,
isRead: false
}, {
limit: 1
});
if (count == 0) {