I am using sequelize with MySQL. For example if I do:
models.People.update({OwnerId: peopleInfo.newuser}, {where: {id: peopleInfo.scenario.id}})
If you're using postgres and updating one row.
try { const result = await MODELNAME.update(req.body, { where: { id: req.params.id }, returning: true }); if (!result) HANDLEERROR() const data = result[1][0].get(); res.status(200).json({ success: true, data }); } catch (error) { HANDLEERROR() }