Last active
November 21, 2016 03:59
-
-
Save georgeportillo/569503edeb90941ac820c98a85315120 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
// I have this: | |
var data = `{ | |
name: "foo" | |
}`; | |
apiWrapper.getCredentials(botId) | |
.then(function(credentials) { | |
apiWrapper.createIntent(credentials, data) | |
.then(intent => { | |
apiWrapper.getIntent(credentials, intent) | |
.then(intent => { | |
// ... I tried this but obviously it didn't work | |
apiWrapper.getCredentials(botId) | |
.then(apiWrapper.createIntent.(credentials, data)) | |
.then(apiWrapper.getIntent(credentials, intent)) | |
.then(intent => { | |
// I'm having a hard time putting these into a chain of then() functions. | |
// I'm getting stuck at passing data from a previous promise to the next one. |
mhchen
commented
Nov 21, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment