-
-
Save AbilashK/bd5dd7cb8128bcc20aed45f985cd15b1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
connection.query(checkLocation, [location]).then(function (rows) { | |
// Location exists | |
return connection.query(addShop, [shopParams]) | |
}).then(function (rows) { | |
// Shop added | |
return connection.query(linkState, [shopParams]) | |
}).then(function (rows) { | |
// Categorize with state | |
callback(1); | |
}).catch(function(err) { | |
console.log(err); | |
callback(0); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment