diff --git a/backend/routes/user.js b/backend/routes/user.js index 3f702178..81e17c13 100644 --- a/backend/routes/user.js +++ b/backend/routes/user.js @@ -128,16 +128,14 @@ router.get("/bulk", async (req, res) => { "$regex": filter } }] + },{ + username: 1, + firstName: 1, + lastName: 1, + _id: 1 }) - res.json({ - user: users.map(user => ({ - username: user.username, - firstName: user.firstName, - lastName: user.lastName, - _id: user._id - })) - }) + res.json(users) }) -module.exports = router; \ No newline at end of file +module.exports = router;