This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Takes 3 parameters: | |
// class: the object type to update; a single String. | |
// restrictions: the set of column restrictions; a Dictionary. | |
// updates: the set of column updates; a Dictionary. | |
Parse.Cloud.define("upsert", function(request, response) { | |
var query = new Parse.Query(request.params.class); | |
var restrictions = JSON.parse(request.params.restrictions); | |
for (var key in restrictions) { |