I want to add an array of current user object ID in to a user's column called "followers". Due to Parse's security reason not allowing modification to non-current user, I'm forced to use cloud code. The problem is I know nothing about JavaScript, so I need help here. Here's what I would code if no security issue mentioned above:
//add the current user ID to the user(userPassed) that the current user liked
[userPassed addUniqueObject:[PFUser currentUser].objectId forKey:@"followers"];
[userPassed saveInBackground];
To be very specific, I just want to know how to code the above in cloud code. Thanks.
Aucun commentaire:
Enregistrer un commentaire