diff --git a/bazarr/api.py b/bazarr/api.py index 0fb02d8af..8e7957064 100644 --- a/bazarr/api.py +++ b/bazarr/api.py @@ -377,14 +377,13 @@ class LanguagesProfiles(Resource): class Notifications(Resource): @authenticate def patch(self): - protocol = request.form.get("protocol") - path = request.form.get("path") + url = request.form.get("url") asset = apprise.AppriseAsset(async_mode=False) apobj = apprise.Apprise(asset=asset) - apobj.add(f"{protocol}://{path}") + apobj.add(url) apobj.notify( title='Bazarr test notification', diff --git a/frontend/src/Settings/Notifications/components.tsx b/frontend/src/Settings/Notifications/components.tsx index c924f4a8d..587ffdb24 100644 --- a/frontend/src/Settings/Notifications/components.tsx +++ b/frontend/src/Settings/Notifications/components.tsx @@ -84,7 +84,7 @@ const NotificationModal: FunctionComponent = ({ variant="outline-secondary" promise={() => { if (current && current.url) { - return SystemApi.testNotification(current.name, current.url); + return SystemApi.testNotification(current.url); } else { return null; } diff --git a/frontend/src/apis/system.ts b/frontend/src/apis/system.ts index 3dac5d126..bc0bb181c 100644 --- a/frontend/src/apis/system.ts +++ b/frontend/src/apis/system.ts @@ -137,9 +137,9 @@ class SystemApi extends BaseApi { }); } - async testNotification(protocol: string, path: string) { + async testNotification(url: string) { return new Promise((resolve, reject) => { - this.patch("/notifications", { protocol, path }) + this.patch("/notifications", { url }) .then(() => resolve()) .catch(reject); });