[SOLVED] Is getUsers() a built-in function?

is getUsers() a built-in function of Moralis.Role?

I was following one of the Moralis tutorials but I get an error when using the getUsers() function in

thisRole.getUsers().add(thisUser);

The error I get is:

Cannot read properties of undefined (reading โ€˜getUsersโ€™)

Yes, getUser() is a built-in function of Moralis.Role.

Maybe the role under thisRole is not on the database or not correct.

Check the below docs for more details on implementation.
https://docs.moralis.io/moralis-dapp/database/roles#parserole-properties

made some changes and itโ€™s now working. thank you!

1 Like