diff --git a/server/face.js b/server/face.js index eaff5a9..6614950 100644 --- a/server/face.js +++ b/server/face.js @@ -64,8 +64,9 @@ require("./db/photos").then(function(db) { console.log(`Scanning ${args.length} faces.`); return Promise.map(args, (arg) => { - const file = arg, - id = parseInt(arg); + const file = arg; + + let id = parseInt(arg); let loader; @@ -129,7 +130,11 @@ require("./db/photos").then(function(db) { }); } - return loader.spread((filepath, image, detectors) => { + return loader.then((results) => { + const filepath = results[0], + image = results[1], + detectors = results[2]; + process.stdout.write(`${detectors.length} faces.\n`); return Promise.map(detectors, (face, index) => {