Skip to content

Commit c47d07a

Browse files
committed
fix: Adding missing index for userNotificationFeed query
1 parent 90823ed commit c47d07a

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

firestore.indexes.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -786,6 +786,20 @@
786786
{ "queryScope": "COLLECTION", "order": "DESCENDING" },
787787
{ "queryScope": "COLLECTION", "arrayConfig": "CONTAINS" }
788788
]
789+
},
790+
{
791+
"collectionGroup": "userNotificationFeed",
792+
"queryScope": "COLLECTION",
793+
"fields": [
794+
{
795+
"fieldPath": "notification.type",
796+
"order": "ASCENDING"
797+
},
798+
{
799+
"fieldPath": "notification.timestamp",
800+
"order": "ASCENDING"
801+
}
802+
]
789803
}
790804
]
791805
}

functions/src/notifications/deliverNotifications.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ const deliverEmailNotifications = async () => {
4444
prepareHandlebars()
4545
console.log("Handlebars helpers and partials prepared")
4646

47-
// TODO: Add index
4847
const usersSnapshot = await db
4948
.collection("users")
5049
.where("nextDigestAt", "<=", now)

0 commit comments

Comments
 (0)