Skip to content

Instantly share code, notes, and snippets.

@ebramanti
Last active February 18, 2016 00:11
Show Gist options
  • Save ebramanti/099d117edf795dc294ae to your computer and use it in GitHub Desktop.
Save ebramanti/099d117edf795dc294ae to your computer and use it in GitHub Desktop.
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