100xdevs-cohort-2 / paytm

144 stars 334 forks source link

Code for updating the user information is wrong #17

Open Parikshit2001 opened 3 months ago

Parikshit2001 commented 3 months ago

In backend->routes->user

await User.updateOne(req.body, {
    id: req.userId
})

res.json({
    message: "Updated successfully"
})

updateOne takes filter as the first argument and updated information as the second argument, but opposite is been done here.