From 95c294556c536083efc92de708fa465b67318bf8 Mon Sep 17 00:00:00 2001 From: arabcoders Date: Fri, 18 Jul 2025 00:24:57 +0300 Subject: [PATCH] Allow the UI to bypass some checks for apprise URLs --- ui/components/NotificationForm.vue | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) 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 = []