Open puneettiwari61 opened 4 years ago
router.put("/update/:id", async (req, res) => { try { var updateUser = await User.findByIdAndUpdate(req.params.id, req.body, { new: true }); res.json({ updateUser }); } catch (err) { console.log(err); res.json({ err }); } });
ok, thanks for your feedback. Highly appreciate it💪
router.put("/update/:id", async (req, res) => { try { var updateUser = await User.findByIdAndUpdate(req.params.id, req.body, { new: true }); res.json({ updateUser }); } catch (err) { console.log(err); res.json({ err }); } });