mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
Displaying error when re-download of Archive request fails.
This commit is contained in:
parent
1795fae1b0
commit
5be4726493
1 changed files with 17 additions and 7 deletions
|
|
@ -105,13 +105,23 @@ function ArchivePage() {
|
|||
navigate(-1);
|
||||
}
|
||||
const localUpdateArchive = async () => {
|
||||
await postDownload([data.url], 'archive');
|
||||
toast({
|
||||
type: 'success',
|
||||
title: 'Archive Downloading',
|
||||
description: 'Archive update has been scheduled.',
|
||||
time: 2000,
|
||||
})
|
||||
const response = await postDownload([archiveFile.url], 'archive');
|
||||
if (response.ok) {
|
||||
toast({
|
||||
type: 'success',
|
||||
title: 'Archive Downloading',
|
||||
description: 'Archive update has been scheduled.',
|
||||
time: 2000,
|
||||
});
|
||||
} else {
|
||||
toast({
|
||||
type: 'error',
|
||||
title: 'Archive Downloading',
|
||||
description: 'Archive update failed.',
|
||||
time: 2000,
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const updateButton = <APIButton
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue