Skip to content

Instantly share code, notes, and snippets.

@markmhx markmhx/gist:8698679

Created Jan 29, 2014
Embed
What would you like to do?
Parse.Cloud.define('findStory', function(request, response) {
Parse.Cloud.useMasterKey();
var storyQuery = new Parse.Query('Story');
storyQuery.include('keptPhotos');
storyQuery.get(request.params.objectId).then(
function(story) {
response.success(story);
},
function() {
response.error('unable to find story');
}
);
});
Parse.Cloud.define('findPhoto', function(request, response) {
Parse.Cloud.useMasterKey();
var query = new Parse.Query('Photo');
query.get(request.params.objectId).then(
function(result) {
response.success(result);
},
function() {
response.error('unable to find photo');
}
);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.