parse-server
parse-server copied to clipboard
Saving Requested Object As New Object In Parse Server Cloud Code
I am trying to save a new object in my cloud code as below, but get no results. Nothing is saved.
var cityObj = new Parse.Object('cities');
cityObj=req.object;
cityObj.save();
But rather than saving the whole object, if I try to save just one item of the object as below, the object with one item is created. Am I doing anything wrong in the code above?
var cityObj = new Parse.Object('cities');
cityObj.set('number', req.object.get('number'));
cityObj.save();
Yes, the code is incorrect but this does not seem to be an issue with parse-server so would be better asked on stackoverflow: http://stackoverflow.com/questions/tagged/parse.com