mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-20 15:06:19 -05:00
Creating ClearFailedDownloads button.
This commit is contained in:
parent
c4f511e469
commit
7ac3fbea2b
5 changed files with 92 additions and 7 deletions
|
|
@ -532,7 +532,7 @@ export async function importMapFiles(paths) {
|
|||
}
|
||||
}
|
||||
|
||||
export async function clearDownloads() {
|
||||
export async function clearCompletedDownloads() {
|
||||
let response = await apiPost(`${API_URI}/download/clear_completed`);
|
||||
if (response.status === 204) {
|
||||
return null
|
||||
|
|
@ -540,7 +540,21 @@ export async function clearDownloads() {
|
|||
toast({
|
||||
type: 'error',
|
||||
title: 'Error!',
|
||||
description: 'Could not clear downloads! See server logs.',
|
||||
description: 'Could not clear completed downloads! See server logs.',
|
||||
time: 5000,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export async function clearFailedDownloads() {
|
||||
let response = await apiPost(`${API_URI}/download/clear_failed`);
|
||||
if (response.status === 204) {
|
||||
return null
|
||||
} else {
|
||||
toast({
|
||||
type: 'error',
|
||||
title: 'Error!',
|
||||
description: 'Could not clear failed downloads! See server logs.',
|
||||
time: 5000,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue