Skip to content

Instantly share code, notes, and snippets.

@bookercodes
Created December 19, 2015 21:53
Show Gist options
  • Save bookercodes/14c505e5b805e5f313f1 to your computer and use it in GitHub Desktop.
Save bookercodes/14c505e5b805e5f313f1 to your computer and use it in GitHub Desktop.
hall
.create({
foo: 'bar'
bar: 'foo
})
.then(function(createdHall) {
const hallId = createdHall.dataValues.id;
return item.create({
hallId: hallId,
foo: 1
});
})
.then(function(createdItem) {
...
});
.catch(function(error) {
console.log('something went wrong with ONE of the promise callbacks (it could be any of them)');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment