Skip to content

Instantly share code, notes, and snippets.

@AbilashK
Created December 23, 2019 07:42
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