Hello. I have a â_Userâ Moralis database with users. Each user has a cell âfollowersâ which is an array. How can I find the user I need in this database and delete or add rows in the âfollowersâ array?
what did you try by now?
I tried to get the user I need using the cloud function. But the problem is that I need constantly different users. It works. but only for one user. I canât pass any value from outside to the cloud function, if I understood everything correctly.
cloud.js
main.js
You can send parameters to a cloud function. And you can access them after that in the cloud function.
You will find some examples on this forum.
Perhaps this is the best I could find on this topic. but it doesnât work.
cloud.js
main.js
console:
you can take a look here:
I found how to pass and use parameters in cloud functions, but I get an error when I want to set the value of the âfollowersâ array
error:
cloud.js
main
query.find returns an array and not an object
you have to get the user object from that array first
thanks, everything works fine