Skip to content

Instantly share code, notes, and snippets.

@AbilashK
Created Dec 23, 2019
Embed
What would you like to do?
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