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 ?
What exactly are you trying to do? What's your use case?
After catching the response, exclude those sensitive key: value pairs and create brand new object yourself and send that modified object as response brother.
I am trying to get the user details using list of user ids. I don't want sensitive fields like password.
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
Yes, this is using MariaDB, Reddis
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.
I understand that part, but why? Can you provide more context on your use case?
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.
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.
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
Hye @yaman Just asking
Are you making any admin dashboard for which you need to list users?
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.
not exactly
Recommended threads
- general_bad_request when creating accoun...
I have created a new bug request, could anyone have a look - https://github.com/appwrite/appwrite/issues/11908?
- Cannot use custom SMTP for messaging (SM...
Hey there! I'm on Appwrite Self-hosted 1.9.0. I've never used the messaging feature before, always sent emails through functions or a custom backend, but I'v...
- CORS errors in Obsidian custom plugin
Hi, anyone here familiar with obsidian community plugins? In short: it's a local first note app which supports writing your own add-ons / plugin But I keep get...