diff --git a/app/library/Tasks.py b/app/library/Tasks.py index 896ec42f..287b3ec5 100644 --- a/app/library/Tasks.py +++ b/app/library/Tasks.py @@ -342,7 +342,6 @@ class Tasks(metaclass=Singleton): ), title=f"Task '{task.name}' completed", message=f"Task '{task.name}' completed at '{timeNow}'", - id=task.id, ) except Exception as e: LOG.error(f"Failed to execute '{task.name}' at '{timeNow}'. '{e!s}'.") diff --git a/ui/components/NotificationForm.vue b/ui/components/NotificationForm.vue index e4d8da7c..308c452a 100644 --- a/ui/components/NotificationForm.vue +++ b/ui/components/NotificationForm.vue @@ -84,7 +84,8 @@ The URL to send the notification to. It can be regular http/https endpoint. - or Apprise URL. + or + Apprise URL. @@ -300,8 +301,20 @@ const showImport = useStorage('showImport', false); const import_string = ref(''); const box = useConfirm() +onMounted(() => { + if (!form.request.data_key) { + form.request.data_key = 'data'; + } +}); + const checkInfo = async () => { - const required = ['name', 'request.url', 'request.method', 'request.type', 'request.data_key']; + let required; + + if (!isApprise.value) { + required = ['name', 'request.url', 'request.method', 'request.type', 'request.data_key']; + } else { + required = ['name', 'request.url']; + } for (const key of required) { if (key.includes('.')) { const [parent, child] = key.split('.'); @@ -315,11 +328,13 @@ const checkInfo = async () => { } } - try { - new URL(form.request.url); - } catch (e) { - toast.error('Invalid URL'); - return; + if (!isApprise.value) { + try { + new URL(form.request.url); + } catch (e) { + toast.error('Invalid URL'); + return; + } } let headers = []