Compare commits

...

2 Commits

Author SHA1 Message Date
7df864b95d Remove all use of spread
Signed-off-by: James Ketrenos <james_git@ketrenos.com>
2023-01-12 15:43:12 -08:00
b1637ad857 Remove all use of spread
Signed-off-by: James Ketrenos <james_git@ketrenos.com>
2023-01-12 15:42:46 -08:00

View File

@ -71,7 +71,8 @@ function scanDir(parent, path) {
let filepath = path + file;
return stat(filepath).then(function(stats) {
if (stats.isDirectory()) {
return scanDir(album, filepath + "/").spread(function(_albums, _assets) {
return scanDir(album, filepath + "/")
.then(([ _albums, _assets ]) => {
albums = albums.concat(_albums);
assets = assets.concat(_assets);
});
@ -108,7 +109,8 @@ function scanDir(parent, path) {
require("./server/db/photos").then(function(db) {
photoDB = db;
return scanDir(null, picturesPath).spread(function(albums, assets) {
return scanDir(null, picturesPath)
.then(([ albums, assets ]) => {
console.log(assets.length + " assets have incorrect dates.");
let toProcess = assets.length, lastMessage = moment(), started = moment();
return photoDB.sequelize.transaction(function (t) {