You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to Save array using cloud cod with parse server. I want if user1 follow user2 I want the user2 get the user1's objectId and Save it to Array table in user class
class called (_User) in user class table called (whoFollowers)
this is my cloud code
Parse.Cloud.define("whoFollowers", function(request, response) {
var newts = new Array();
var parsedJson = JSON.parse( request.params.push );
for ( var i = 0; i < parsedJson.length; i++ )
{
var userId = request.params.userId;
var User = Parse.Object.extend('_User'),
var whoFollowers = request.params.datalist[i];
User.set("push", "0");
newts[i]=User;
}
Parse.Object.saveAll(newts,{
success: function(list) {
response.success("ok " );
},
error: function(error) {
response.error("failure on saving list ");
},
});
});
// swift code
let request = [
"userId" : self.otheruserObj.objectId!,
"whoFollowers" : currUser.objectId!,
] as [String : Any]
PFCloud.callFunction(inBackground: "whoFollowers", withParameters: request as [String : Any], block: { (results, error) in
if error == nil {
print ("success")
}})
The text was updated successfully, but these errors were encountered:
@fairs-222 What is the status of this? Can you please provide some more information about what you are trying to accomplish and what errors you are receiving?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I'm trying to Save array using cloud cod with parse server. I want if user1 follow user2 I want the user2 get the user1's objectId and Save it to Array table in user class
class called (_User) in user class table called (whoFollowers)
this is my cloud code
// swift code
The text was updated successfully, but these errors were encountered: