1
0
mirror of https://github.com/hotomoe/hotomoe synced 2024-12-12 05:38:12 +09:00

Improve performance

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

View File

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

View File

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