Excluded URLs was not displayed correctly.

This commit is contained in:
Roland 2024-07-03 21:35:38 -06:00
parent 54bc870b70
commit 7a784d7c45
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
2 changed files with 5 additions and 5 deletions

View file

@ -579,7 +579,7 @@ export async function putDownload(
frequency: frequency || null,
settings: settings,
};
const response = await apiPut(`${API_URI}/download`, body);
const response = await apiPut(`${API_URI}/download/${download_id}`, body);
return response;
}

View file

@ -116,7 +116,7 @@ export function DownloadEditForm({afterSave, closeModal, download}) {
const [state, setState] = React.useState({
url: download.url || '',
frequency: download.frequency,
excluded_urls: download.excluded_urls || '',
excluded_urls: download.settings ? download.settings.excluded_urls : '',
})
const [disabled, setDisabled] = React.useState(useWROLMode());
const [loading, setLoading] = React.useState(false);
@ -147,12 +147,12 @@ export function DownloadEditForm({afterSave, closeModal, download}) {
if (!response.ok) {
throw 'Updating download failed';
}
} finally {
setLoading(false);
setDisabled(false);
if (afterSave) {
afterSave();
}
} finally {
setLoading(false);
setDisabled(false);
}
}