mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2025-03-04 07:18:50 -07:00
Improve performance
This commit is contained in:
parent
4f686f45e2
commit
5dbc9a1ac8
2 changed files with 4 additions and 0 deletions
|
@ -57,6 +57,8 @@ export default (
|
||||||
.count({
|
.count({
|
||||||
recipientId: userId,
|
recipientId: userId,
|
||||||
isRead: false
|
isRead: false
|
||||||
|
}, {
|
||||||
|
limit: 1
|
||||||
});
|
});
|
||||||
|
|
||||||
if (count == 0) {
|
if (count == 0) {
|
||||||
|
|
|
@ -43,6 +43,8 @@ export default (
|
||||||
.count({
|
.count({
|
||||||
notifieeId: userId,
|
notifieeId: userId,
|
||||||
isRead: false
|
isRead: false
|
||||||
|
}, {
|
||||||
|
limit: 1
|
||||||
});
|
});
|
||||||
|
|
||||||
if (count == 0) {
|
if (count == 0) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue