-
-
Save boo1ean/85cd7be045a55b4e9621 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
var cats = require('services/cats'); | |
var dogs = require('services/dogs'); | |
var doStuff = function(data) { | |
whether(data.doge).then(function() { | |
return dogs.create(data).then(function(doge) { | |
data.doge_id = doge.id; | |
}); | |
}).then(function() { | |
return cats.create(data); | |
}); | |
}; | |
module.exports = doStuff; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment