Hi all,
Today we've tried experimenting with back4app migration tools, to migrate our parse DB. Everything went smoothly to say at least, except the cloud code functions.
We imported our parse "main.js" file. The calls from our app to the the main.js functions are successful, however, the "object.set()" and "object.save()" functions do not.
I'll post a sample code below so that you can take a look and let me know whether you have come across something similar lately.
Now, we may have missed something in the tutorials but since we can't access the back4app Blog today, we'll just try this group.
Thanks in advance. We're so eager in hearing back from you.
A function in main.js:
---------------
Parse.Cloud.define("whateverName", function(request,response) {
var user = new Parse.User();
var query = new Parse.Query(Parse.User);
query.equalTo("objectId", request.params.objectId);
query.first({
success: function(object) {
var logInfo = "\n what = "+ request.params.what;
object.set("what", request.params.what);
object.save();
console.log(logInfo);
response.success({Data:"Done"});
},
error: function(error) {
response.error("WhateverName[" + error.code + "]: " + error.message + "");
}
});
});
Console Logs:
--------------
But the 'request.params.what' value that was supposed to be set in "what" column in parse DB is never set. It just stays "undefined".