Notifications UI update and delete endpoint

This commit is contained in:
advplyr 2022-09-23 18:10:03 -05:00
parent b08ad8785e
commit 37a3fdb606
6 changed files with 95 additions and 21 deletions

View file

@ -48,8 +48,8 @@ class NotificationManager {
sendNotification(notification, eventData) {
const payload = notification.getApprisePayload(eventData)
return axios.post(`${this.db.notificationSettings.appriseApiUrl}/notify`, payload, { timeout: 6000 }).then((data) => {
Logger.debug(`[NotificationManager] sendNotification: ${notification.eventName}/${notification.id} response=${data}`)
return axios.post(`${this.db.notificationSettings.appriseApiUrl}/notify`, payload, { timeout: 6000 }).then((response) => {
Logger.debug(`[NotificationManager] sendNotification: ${notification.eventName}/${notification.id} response=`, response.data)
return true
}).catch((error) => {
Logger.error(`[NotificationManager] sendNotification: ${notification.eventName}/${notification.id} error=`, error)