Last active
February 18, 2016 00:11
-
-
Save ebramanti/099d117edf795dc294ae to your computer and use it in GitHub Desktop.
This file contains 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 getRobotData = function () { | |
var findRobot = function () { | |
return Robot.find({ name: 'Wheatley' }); | |
}; | |
var makeRequest = function (robot) { | |
return RobotDataAPI.get('/robots/' + robot.id); | |
}; | |
return createRobot.then(makeRequest).then(function (response) { | |
return response.body.robot; | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment