medium10 pts · first answer countssecurityapi-design
Saving req.body directly
What is the main problem with this "update my profile" endpoint?
app.patch('/me', auth, async (req, res) => {
await db.user.update({ where: { id: req.user.id }, data: req.body })
res.sendStatus(204)
})