We wrote the parse cloud function to update the object .
Until today morning it was working fine. Now our cloud code is not working . can you please check this ?
Below is our code to update the object which is throwing error
var point = new query(); for this line we are getting error like
TypeError: undefined is not a function
below is our full code
var query = Parse.Object.extend("Merchants");
var point = new query();
point.id = request.params.id;
point.set("keyfield1",request.params.keyfield1);
point.set("keyfield2",request.params.keyfield2);
point.set("keyfield3",request.params.keyfield3);
point.set("keyfield4",request.params.keyfield4);
point.set("keyfield5",request.params.keyfield5);
point.save(null,{
success:function(response)
{
var resp={};
resp.ResponseCode = "1000";
resp.data = response;
response.success(resp);
},
error:function(response)
{
response.error(response.status);
}
});
Can you please help us with this issue.