mirror of
https://github.com/Sebclem/hassio-nextcloud-backup.git
synced 2024-11-26 02:52:59 +01:00
Compare commits
3 Commits
bb2c695f31
...
f73273ad60
Author | SHA1 | Date | |
---|---|---|---|
|
f73273ad60 | ||
93e821794e | |||
cfe6778745 |
@ -9,7 +9,7 @@
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-free": "6.1.2",
|
||||
"app-root-path": "3.0.0",
|
||||
"bootstrap": "5.2.0",
|
||||
"bootstrap": "5.1.3",
|
||||
"cookie-parser": "1.4.6",
|
||||
"cron": "2.1.0",
|
||||
"debug": "4.3.4",
|
||||
@ -19,7 +19,7 @@
|
||||
"got": "12.3.0",
|
||||
"http-errors": "2.0.0",
|
||||
"jquery": "3.6.0",
|
||||
"luxon": "3.0.1",
|
||||
"luxon": "3.1.0",
|
||||
"morgan": "1.10.0",
|
||||
"webdav": "4.10.0",
|
||||
"winston": "3.8.1"
|
||||
|
@ -21,7 +21,7 @@ router.get("/formated-local-snap", function (req, res, next) {
|
||||
hassioApiTools.getSnapshots()
|
||||
.then((snaps) => {
|
||||
snaps.sort((a, b) => {
|
||||
return a.date < b.date ? 1 : -1
|
||||
return Date.parse(b.date) - Date.parse(a.date);
|
||||
});
|
||||
|
||||
res.render("localSnaps", { snaps: snaps, DateTime: DateTime });
|
||||
@ -43,7 +43,7 @@ router.get("/formated-backup-manual", function (req, res, next) {
|
||||
.getFolderContent(webdav.getConf().back_dir + pathTools.manual)
|
||||
.then((contents) => {
|
||||
contents.sort((a, b) => {
|
||||
return a.date < b.date ? 1 : -1
|
||||
return Date.parse(b.lastmod) - Date.parse(a.lastmod)
|
||||
});
|
||||
//TODO Remove this when bug is fixed, etag contain '"' at start and end ?
|
||||
for (let backup of contents) {
|
||||
@ -67,7 +67,7 @@ router.get("/formated-backup-auto", function (req, res, next) {
|
||||
.getFolderContent(url)
|
||||
.then((contents) => {
|
||||
contents.sort((a, b) => {
|
||||
return a.date < b.date ? 1 : -1
|
||||
return Date.parse(b.lastmod) - Date.parse(a.lastmod)
|
||||
});
|
||||
//TODO Remove this when bug is fixed, etag contain '"' at start and end ?
|
||||
for (let backup of contents) {
|
||||
|
@ -295,7 +295,7 @@ function clean() {
|
||||
return;
|
||||
}
|
||||
snaps.sort((a, b) => {
|
||||
return a.date < b.date ? 1 : -1
|
||||
return Date.parse(b.date) - Date.parse(a.date);
|
||||
});
|
||||
let toDel = snaps.slice(limit);
|
||||
for (let i of toDel) {
|
||||
|
@ -380,12 +380,13 @@ class WebdavTools {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.getFolderContent(this.getConf().back_dir + pathTools.auto)
|
||||
.then(async (contents) => {
|
||||
|
||||
if (contents.length < limit) {
|
||||
resolve();
|
||||
return;
|
||||
}
|
||||
contents.sort((a, b) => {
|
||||
return a.date < b.date ? 1 : -1
|
||||
return Date.parse(b.lastmod) - Date.parse(a.lastmod)
|
||||
});
|
||||
|
||||
let toDel = contents.slice(limit);
|
||||
|
@ -197,12 +197,12 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"bootstrap@npm:5.2.0":
|
||||
version: 5.2.0
|
||||
resolution: "bootstrap@npm:5.2.0"
|
||||
"bootstrap@npm:5.1.3":
|
||||
version: 5.1.3
|
||||
resolution: "bootstrap@npm:5.1.3"
|
||||
peerDependencies:
|
||||
"@popperjs/core": ^2.11.5
|
||||
checksum: 9dbfb5d26bbdac3e27a6b46cb7456cd4dd75ae3b48644737809885b8ea9c265d3359c4cdbf25a55bb7e5046f51e441557033ba21eeaf24ef8316bfbb3d420084
|
||||
"@popperjs/core": ^2.10.2
|
||||
checksum: 301b5ed872efba061104cf22ac93568e3837867fb5527ab9326a51510fb752bd4883e1d488225c8be72f86d9d3a55ef5b166aa7fa62c2fdd077c3f05b65752f8
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@ -938,10 +938,10 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"luxon@npm:3.0.1":
|
||||
version: 3.0.1
|
||||
resolution: "luxon@npm:3.0.1"
|
||||
checksum: aa966eb919bf95b1bd819cda784d1f6f66e3fb65bd9ec7bf68b6a978eeb4e3e14f7e2275021b473f93b15b6b7ba2e5a30471e53add3929a7e695fcfd6dd40ec8
|
||||
"luxon@npm:3.1.0":
|
||||
version: 3.1.0
|
||||
resolution: "luxon@npm:3.1.0"
|
||||
checksum: f8a850b759ba7a2e009d904c522ed7bc264bf4add57578f8948e52a0ed96b627b025b5aad8032295b570ae19fac41f0ffab91bdb128715fb0cc020798a7ba886
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@ -1095,7 +1095,7 @@ __metadata:
|
||||
dependencies:
|
||||
"@fortawesome/fontawesome-free": 6.1.2
|
||||
app-root-path: 3.0.0
|
||||
bootstrap: 5.2.0
|
||||
bootstrap: 5.1.3
|
||||
cookie-parser: 1.4.6
|
||||
cron: 2.1.0
|
||||
debug: 4.3.4
|
||||
@ -1105,7 +1105,7 @@ __metadata:
|
||||
got: 12.3.0
|
||||
http-errors: 2.0.0
|
||||
jquery: 3.6.0
|
||||
luxon: 3.0.1
|
||||
luxon: 3.1.0
|
||||
morgan: 1.10.0
|
||||
webdav: 4.10.0
|
||||
winston: 3.8.1
|
||||
|
Loading…
Reference in New Issue
Block a user