Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我的架构有用户名位置电话号码邮件通过邮寄请求我给了一个带有用户名和位置的 json 对象有没有可能在猫鼬中使用 findbyIdandupdate() 添加电话号码和邮件
router.post('/updateUser', (req, res) => { const { id, update } = req.body; schema.findByIdAndUpdate(id, update, (err) => { if (err) return res.json({ success: false, error: err}) return res.json({ success: true }) }) })
您可以使用 Postman 或 Insomnia 等应用程序测试请求