mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 02:48:38 -04:00
Creating ClearCompleteDownloads button.
This commit is contained in:
parent
5178f72b66
commit
c4f511e469
6 changed files with 99 additions and 9 deletions
|
|
@ -531,3 +531,17 @@ export async function importMapFiles(paths) {
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
export async function clearDownloads() {
|
||||
let response = await apiPost(`${API_URI}/download/clear_completed`);
|
||||
if (response.status === 204) {
|
||||
return null
|
||||
} else {
|
||||
toast({
|
||||
type: 'error',
|
||||
title: 'Error!',
|
||||
description: 'Could not clear downloads! See server logs.',
|
||||
time: 5000,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue