Rank 1: Thread
I am using appwrite node sdk to get list of all users, users.list(), however I am getting sensitive informations like password hashes in response. Is there any way to omit those fields while making the query ?
Votes
0
Replies
14
Participants
Unknown
Messages
15
Rank 1: Thread
I am using appwrite node sdk to get list of all users, users.list(), however I am getting sensitive informations like password hashes in response. Is there any way to omit those fields while making the query ?
Admin
What exactly are you trying to do? What's your use case?
Rank 3: Container
After catching the response, exclude those sensitive key: value pairs and create brand new object yourself and send that modified object as response brother.
Rank 1: Thread
I am trying to get the user details using list of user ids. I don't want sensitive fields like password.
Rank 1: Thread
Hmm I did that but I want something more efficient. Like filtering directly while making the query just like we have option to omit fields in mongodb using .select() . Filtering after getting the response might be a bit inefficient if there are large number of users
Rank 3: Container
Yes, this is using MariaDB, Reddis
Rank 3: Container
I think, there won't be this feature. may be they will introduce it in their next version if we could post issue in their repository. with valid argument.
Admin
I understand that part, but why? Can you provide more context on your use case?
Rank 1: Thread
Basically, I have a collection called "reviews" that has a field called user_id which maps to the unique id of user. When I fetch reviews, I want the full name and email of user. Currently, I am fetching user details and reviews separately on client side and then populating each reviews with name and email of user who posted it.
Rank 1: Thread
I know it can be done securely using server sdk, but I was wondering if there are ways to omit certain fields while making queries.
Admin
You really want to expose people's emails? 🧐
The way I typically handle this is to create a profiles collection for the public facing attributes
Rank 3: Container
Hye @yaman Just asking
Are you making any admin dashboard for which you need to list users?
Web Developer
Just add a new field for username in the reviews and add the name of the user to the field while they create the review instead of fetching users and reviews separately. Just a suggestion 😊
There's a Query.select query that you can use for this, but I'm not sure if this was a feature added in 1.3.x.
Rank 1: Thread
not exactly