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

Add user actions to web app

This commit is contained in:
Philipp Heckel 2022-04-21 16:33:49 -04:00
parent 12d347976c
commit 26ebd23bfd
13 changed files with 126 additions and 18 deletions

View file

@ -92,6 +92,19 @@ class SubscriptionManager {
});
}
async updateNotification(notification) {
const exists = await db.notifications.get(notification.id);
if (!exists) {
return false;
}
try {
await db.notifications.put({ ...notification });
} catch (e) {
console.error(`[SubscriptionManager] Error updating notification`, e);
}
return true;
}
async deleteNotification(notificationId) {
await db.notifications.delete(notificationId);
}