Remove all use of spread
Signed-off-by: James Ketrenos <james_git@ketrenos.com>
This commit is contained in:
parent
44e62f6119
commit
5a91c89730
@ -182,7 +182,7 @@ require("./db/photos").then(function(db) {
|
||||
return photoDB.sequelize.query("INSERT INTO faces (photoId,top,left,bottom,right,faceConfidence) " +
|
||||
"VALUES (:id,:top,:left,:bottom,:right,:faceConfidence)", {
|
||||
replacements: replacements
|
||||
}).spread((results, metadata) => {
|
||||
}).then(([ results, metadata ]) => {
|
||||
return metadata.lastID;
|
||||
}).then((id) => {
|
||||
const path = facesPath + (id % 100);
|
||||
|
@ -69,7 +69,7 @@ router.post("/", (req, res) => {
|
||||
"(" + fields.join(",") + ") " +
|
||||
"VALUES(:" + fields.join(",:") + ")", {
|
||||
replacements: identity,
|
||||
}).spread(function(results, metadata) {
|
||||
}).then(([ results, metadata ]) => {
|
||||
identity.id = metadata.lastID;
|
||||
return photoDB.sequelize.query("UPDATE faces SET identityId=:identityId,identityDistance=0 " +
|
||||
"WHERE id IN (:faceIds)", {
|
||||
|
@ -189,7 +189,7 @@ require("../server/db/photos").then(function(db) {
|
||||
return photoDB.sequelize.query("INSERT INTO photos " +
|
||||
"(albumId,filename,name,size) VALUES(:albumId,:filename,:name,:size)", {
|
||||
replacements: asset
|
||||
}).spread(function(results, metadata) {
|
||||
}).then(([ results, metadata ]) => {
|
||||
asset.id = metadata.lastID;
|
||||
});
|
||||
}).then(function() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user