javascript - Parse Promises, destroyAll(); not working? -
the second line in code below not executing during cloud job, why might case? prior line runs fine.
parse.object.destroyall(apples).then(function() { return parse.object.destroyall(pears); //destroy pear objects. }, function(error) { status.error("failed destroy apples/pears."); }); status.success("successfully deleted " + results.length + " pears.");
your status.success
run synchronously before destroyall(pears) chance run
try way
parse.object.destroyall(apples).then(function() { return parse.object.destroyall(pears); //destroy pear objects. }).then(function() { status.success("successfully deleted " + results.length + " pears."); }, function(error) { status.error("failed destroy apples/pears."); });
Comments
Post a Comment