mirror of
https://git.vectorsigma.ru/public/tubearchivist.git
synced 2026-08-04 21:59:33 +00:00
fix notification url delete
This commit is contained in:
@@ -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 },
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -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);
|
||||||
}}
|
}}
|
||||||
|
|||||||
Reference in New Issue
Block a user