🔨 Catch some errors

This commit is contained in:
SebClem 2022-04-30 16:08:56 +02:00
parent 02d2fd9ae3
commit d1e31d2472
Signed by: sebclem
GPG Key ID: 5A4308F6A359EA50

View File

@ -128,9 +128,15 @@ router.post("/manual-backup", function (req, res, next) {
hassioApiTools hassioApiTools
.downloadSnapshot(id) .downloadSnapshot(id)
.then(() => { .then(() => {
webdav.uploadFile(id, webdav.getConf().back_dir + pathTools.manual + name + ".tar").catch(); webdav.uploadFile(id, webdav.getConf().back_dir + pathTools.manual + name + ".tar").then(()=>{
res.status(201); res.status(201);
res.send(); res.send();
}).catch(()=>{
res.status(500);
res.send();
}
);
}) })
.catch(() => { .catch(() => {
res.status(500); res.status(500);
@ -159,10 +165,10 @@ router.post("/new-backup", function (req, res, next) {
.then(() => { .then(() => {
hassioApiTools.startAddons().catch(() => { hassioApiTools.startAddons().catch(() => {
}) })
});
}).catch(()=>{}); }).catch(()=>{});
}).catch(()=>{}); }).catch(()=>{});
}).catch(()=>{});; }).catch(()=>{});
}).catch(()=>{});
}) })
.catch(() => { .catch(() => {
hassioApiTools.startAddons().catch(() => { hassioApiTools.startAddons().catch(() => {