kakadu222Original post
Web Developer
i got a getDocument that lists data from the user (username, password, id.....)
so my question is how do i exclude the password so it doesnt get listed out?
my code:
const result = await database.getDocument(
DATABASE_ID,
USERS_COLLECTION_ID,
userId.documents[0].$id
);
Summary
Developers are concerned about having the password field in the response from the getDocument query and want to exclude it. To do this, use the Query.select method and specify the attributes you want to fetch, such as "name" and "title" in this case. By doing so, the password field can be omitted from the response.