Skip to content

Instantly share code, notes, and snippets.

@tarunmahe
tarunmahe / main.js
Last active August 29, 2015 14:27 — forked from gfosco/main.js
// The before save handler will pass information to the after save handler to disable the
// after save handler from creating a loop.
// It also prevents client side code from triggering the silent change, by using a different flag
// that the client should never see.
// It should only be visible in the data browser, won't be sent to a client in an undefined state.
Parse.Cloud.beforeSave('TestObject', function(request, response) {
handleComingFromTask(request.object);
response.success();
});