Closed Akshat2Jain closed 4 months ago
final code of https://github.com/100xdevs-cohort-2/paytm/blob/backend-solution/backend/routes/user.js from line 121: ` const users = await User.find({'$nor': [{ _id: req.userId }]},{ $or: [{ firstName: { "$regex": filter } }, { lastName: { "$regex": filter } }] })
`
Thanks!
for eg: If Harkirat is logged in, then he should not see his name coming in the dashboard, it will be stupid if that person is sending money to himself only,
How to tackle this while getting all the users except the user who is logged in?