Closed muringitech closed 1 week ago
const updateUser = await User.findByIdAndUpdate(req.params.id, { $set:{ username: req.body.username, email: req.body.email, password: req.body.password, avatar: req.body.avatar, } }); } catch (error) { next (error) } };
const updateUser = await User.findByIdAndUpdate(req.params.id, { $set:{ username: req.body.username, email: req.body.email, password: req.body.password, avatar: req.body.avatar, } }); } catch (error) { next (error) } };