From 74c708baa2ea9374cfdb03e00527e9a3881e0bd7 Mon Sep 17 00:00:00 2001 From: Simon Date: Sun, 6 Jul 2025 20:23:39 +0700 Subject: [PATCH] fix notification url delete --- frontend/src/api/actions/deleteAppriseNotificationUrl.ts | 4 ++-- frontend/src/pages/SettingsScheduling.tsx | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/frontend/src/api/actions/deleteAppriseNotificationUrl.ts b/frontend/src/api/actions/deleteAppriseNotificationUrl.ts index 5018b79f..33153c49 100644 --- a/frontend/src/api/actions/deleteAppriseNotificationUrl.ts +++ b/frontend/src/api/actions/deleteAppriseNotificationUrl.ts @@ -6,10 +6,10 @@ type AppriseTaskNameType = | 'download_pending' | 'check_reindex'; -const deleteAppriseNotificationUrl = async (taskName: AppriseTaskNameType) => { +const deleteAppriseNotificationUrl = async (taskName: AppriseTaskNameType, url: string) => { return APIClient('/api/task/notification/', { method: 'DELETE', - body: { task_name: taskName }, + body: { task_name: taskName, url: url }, }); }; diff --git a/frontend/src/pages/SettingsScheduling.tsx b/frontend/src/pages/SettingsScheduling.tsx index b2d064b5..7ee95012 100644 --- a/frontend/src/pages/SettingsScheduling.tsx +++ b/frontend/src/pages/SettingsScheduling.tsx @@ -519,7 +519,10 @@ const SettingsScheduling = () => { className="danger-button" label="Delete" onClick={async () => { - await deleteAppriseNotificationUrl(key as AppriseTaskNameType); + await deleteAppriseNotificationUrl( + key as AppriseTaskNameType, + url, + ); setRefresh(true); }}