fix notification url delete

This commit is contained in:
Simon
2025-07-06 20:23:39 +07:00
parent f87309dbd1
commit 74c708baa2
2 changed files with 6 additions and 3 deletions

View File

@@ -6,10 +6,10 @@ type AppriseTaskNameType =
| 'download_pending' | 'download_pending'
| 'check_reindex'; | 'check_reindex';
const deleteAppriseNotificationUrl = async (taskName: AppriseTaskNameType) => { const deleteAppriseNotificationUrl = async (taskName: AppriseTaskNameType, url: string) => {
return APIClient('/api/task/notification/', { return APIClient('/api/task/notification/', {
method: 'DELETE', method: 'DELETE',
body: { task_name: taskName }, body: { task_name: taskName, url: url },
}); });
}; };

View File

@@ -519,7 +519,10 @@ const SettingsScheduling = () => {
className="danger-button" className="danger-button"
label="Delete" label="Delete"
onClick={async () => { onClick={async () => {
await deleteAppriseNotificationUrl(key as AppriseTaskNameType); await deleteAppriseNotificationUrl(
key as AppriseTaskNameType,
url,
);
setRefresh(true); setRefresh(true);
}} }}