Skip to content

Commit 7ffd05d

Browse files
committed
chore: strip password from getUsers query
1 parent af49ea1 commit 7ffd05d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/db/mongo/users.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ exports.findUser = async function (username) {
99
exports.getUsers = async function (query) {
1010
console.log(`Getting users for query= ${JSON.stringify(query)}`);
1111
const collection = await connect(usersCollection);
12-
return collection.find(query).toArray();
12+
return collection.find(query, { password: 0 }).toArray();
1313
};
1414

1515
exports.deleteUser = async function (username) {

0 commit comments

Comments
 (0)