Skip to content

Instantly share code, notes, and snippets.

@natanrolnik
Last active October 21, 2015 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save natanrolnik/8bc3631cb4d4b534ea5c to your computer and use it in GitHub Desktop.
Save natanrolnik/8bc3631cb4d4b534ea5c to your computer and use it in GitHub Desktop.
Parse.Cloud.afterSave("LaneResult", function(request) {
var query = new Parse.Query(Parse.Installation);
var text = "New event from " + request.object.get("App") + ": " + request.object.get("EventType");
Parse.Push.send({
where: query, // Set our Installation query
data: {
alert: text,
sound: "register.aiff"
}
}, {
success: function() {
// Push was successful
},
error: function(error) {
// Handle error
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment