Add: failed backup notification

This commit is contained in:
Nicholas Wallace 2024-08-03 14:52:49 -07:00
parent 37cf019e99
commit d6b5363ab9
2 changed files with 23 additions and 0 deletions

View file

@ -50,6 +50,16 @@ class NotificationManager {
this.triggerNotification('onBackupCompleted', eventData)
}
async onBackupFailed(errorMsg) {
if (!Database.notificationSettings.isUseable) return
Logger.debug(`[NotificationManager] onBackupFailed: Backup failed`)
const eventData = {
errorMsg: errorMsg || 'Backup failed'
}
this.triggerNotification('onBackupFailed', eventData)
}
onTest() {
this.triggerNotification('onTest')
}