Created
December 19, 2015 21:53
-
-
Save bookercodes/14c505e5b805e5f313f1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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