NodeJS Update Route: Update Value Only if Defined

后端 未结 0 1385
情歌与酒
情歌与酒 2020-12-31 21:38

I have the following update route:

router.put(\'/:id\', upload.single(\'userImage\'), (req, res) => {
    Users.findById(req.params.id)
        .then(user          


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题