1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-06-02 19:35:53 +02:00

Home page; "all notifications"

This commit is contained in:
Philipp Heckel 2022-03-07 16:36:49 -05:00
parent 1d2f3f72e4
commit 5bed926323
5 changed files with 73 additions and 46 deletions

View file

@ -38,6 +38,14 @@ class SubscriptionManager {
async getNotifications(subscriptionId) {
return db.notifications
.where({ subscriptionId: subscriptionId })
.reverse()
.sortBy("time"); // Inefficient, but there is no other way (see docs)
}
async getAllNotifications() {
return db.notifications
.orderBy("time") // Efficient, see docs
.reverse()
.toArray();
}