mirror of
https://github.com/Sebclem/hassio-nextcloud-backup.git
synced 2024-11-14 13:32:59 +01:00
🔨 Catch some errors
This commit is contained in:
parent
02d2fd9ae3
commit
d1e31d2472
@ -128,9 +128,15 @@ router.post("/manual-backup", function (req, res, next) {
|
||||
hassioApiTools
|
||||
.downloadSnapshot(id)
|
||||
.then(() => {
|
||||
webdav.uploadFile(id, webdav.getConf().back_dir + pathTools.manual + name + ".tar").catch();
|
||||
res.status(201);
|
||||
res.send();
|
||||
webdav.uploadFile(id, webdav.getConf().back_dir + pathTools.manual + name + ".tar").then(()=>{
|
||||
res.status(201);
|
||||
res.send();
|
||||
}).catch(()=>{
|
||||
res.status(500);
|
||||
res.send();
|
||||
}
|
||||
);
|
||||
|
||||
})
|
||||
.catch(() => {
|
||||
res.status(500);
|
||||
@ -159,10 +165,10 @@ router.post("/new-backup", function (req, res, next) {
|
||||
.then(() => {
|
||||
hassioApiTools.startAddons().catch(() => {
|
||||
})
|
||||
});
|
||||
}).catch(()=>{});
|
||||
}).catch(()=>{});
|
||||
}).catch(()=>{});
|
||||
}).catch(()=>{});;
|
||||
}).catch(()=>{});
|
||||
})
|
||||
.catch(() => {
|
||||
hassioApiTools.startAddons().catch(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user