mirror of
https://github.com/Sebclem/hassio-nextcloud-backup.git
synced 2024-11-26 02:52:59 +01:00
Compare commits
3 Commits
341801c357
...
05f823a962
Author | SHA1 | Date | |
---|---|---|---|
|
05f823a962 | ||
93e821794e | |||
cfe6778745 |
@ -7,9 +7,9 @@
|
|||||||
"start": "node ./bin/www.js "
|
"start": "node ./bin/www.js "
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fortawesome/fontawesome-free": "6.1.2",
|
"@fortawesome/fontawesome-free": "6.2.1",
|
||||||
"app-root-path": "3.0.0",
|
"app-root-path": "3.0.0",
|
||||||
"bootstrap": "5.2.0",
|
"bootstrap": "5.1.3",
|
||||||
"cookie-parser": "1.4.6",
|
"cookie-parser": "1.4.6",
|
||||||
"cron": "2.1.0",
|
"cron": "2.1.0",
|
||||||
"debug": "4.3.4",
|
"debug": "4.3.4",
|
||||||
|
@ -21,7 +21,7 @@ router.get("/formated-local-snap", function (req, res, next) {
|
|||||||
hassioApiTools.getSnapshots()
|
hassioApiTools.getSnapshots()
|
||||||
.then((snaps) => {
|
.then((snaps) => {
|
||||||
snaps.sort((a, b) => {
|
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 });
|
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)
|
.getFolderContent(webdav.getConf().back_dir + pathTools.manual)
|
||||||
.then((contents) => {
|
.then((contents) => {
|
||||||
contents.sort((a, b) => {
|
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 ?
|
//TODO Remove this when bug is fixed, etag contain '"' at start and end ?
|
||||||
for (let backup of contents) {
|
for (let backup of contents) {
|
||||||
@ -67,7 +67,7 @@ router.get("/formated-backup-auto", function (req, res, next) {
|
|||||||
.getFolderContent(url)
|
.getFolderContent(url)
|
||||||
.then((contents) => {
|
.then((contents) => {
|
||||||
contents.sort((a, b) => {
|
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 ?
|
//TODO Remove this when bug is fixed, etag contain '"' at start and end ?
|
||||||
for (let backup of contents) {
|
for (let backup of contents) {
|
||||||
|
@ -295,7 +295,7 @@ function clean() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
snaps.sort((a, b) => {
|
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);
|
let toDel = snaps.slice(limit);
|
||||||
for (let i of toDel) {
|
for (let i of toDel) {
|
||||||
|
@ -380,12 +380,13 @@ class WebdavTools {
|
|||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
this.getFolderContent(this.getConf().back_dir + pathTools.auto)
|
this.getFolderContent(this.getConf().back_dir + pathTools.auto)
|
||||||
.then(async (contents) => {
|
.then(async (contents) => {
|
||||||
|
|
||||||
if (contents.length < limit) {
|
if (contents.length < limit) {
|
||||||
resolve();
|
resolve();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
contents.sort((a, b) => {
|
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);
|
let toDel = contents.slice(limit);
|
||||||
|
@ -23,10 +23,10 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@fortawesome/fontawesome-free@npm:6.1.2":
|
"@fortawesome/fontawesome-free@npm:6.2.1":
|
||||||
version: 6.1.2
|
version: 6.2.1
|
||||||
resolution: "@fortawesome/fontawesome-free@npm:6.1.2"
|
resolution: "@fortawesome/fontawesome-free@npm:6.2.1"
|
||||||
checksum: 0d3c9d60ffbb9c1fa4041051eff6542adc1fc29653501399d0235c077a2195a35f286d979da42fe021f73649032f9eeae2c9a0511eaacda2896559155d40a0fc
|
checksum: c77b7c8b0965e5c17f4ca45667885b6273e26af97a9e83db343fc756c159b5acd35cf420e73e1b916af1d275179290ccfb1900af48631749e30f36464f339bd3
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@ -197,12 +197,12 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"bootstrap@npm:5.2.0":
|
"bootstrap@npm:5.1.3":
|
||||||
version: 5.2.0
|
version: 5.1.3
|
||||||
resolution: "bootstrap@npm:5.2.0"
|
resolution: "bootstrap@npm:5.1.3"
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
"@popperjs/core": ^2.11.5
|
"@popperjs/core": ^2.10.2
|
||||||
checksum: 9dbfb5d26bbdac3e27a6b46cb7456cd4dd75ae3b48644737809885b8ea9c265d3359c4cdbf25a55bb7e5046f51e441557033ba21eeaf24ef8316bfbb3d420084
|
checksum: 301b5ed872efba061104cf22ac93568e3837867fb5527ab9326a51510fb752bd4883e1d488225c8be72f86d9d3a55ef5b166aa7fa62c2fdd077c3f05b65752f8
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@ -1093,9 +1093,9 @@ __metadata:
|
|||||||
version: 0.0.0-use.local
|
version: 0.0.0-use.local
|
||||||
resolution: "nexcloud-backup@workspace:."
|
resolution: "nexcloud-backup@workspace:."
|
||||||
dependencies:
|
dependencies:
|
||||||
"@fortawesome/fontawesome-free": 6.1.2
|
"@fortawesome/fontawesome-free": 6.2.1
|
||||||
app-root-path: 3.0.0
|
app-root-path: 3.0.0
|
||||||
bootstrap: 5.2.0
|
bootstrap: 5.1.3
|
||||||
cookie-parser: 1.4.6
|
cookie-parser: 1.4.6
|
||||||
cron: 2.1.0
|
cron: 2.1.0
|
||||||
debug: 4.3.4
|
debug: 4.3.4
|
||||||
|
Loading…
Reference in New Issue
Block a user