title: Node rest API: put request is not updating the request data
body: <p>Trying to update data using PUT request. But, the data is not updating and returning the previous data in postman.</p>
  
  <p>Postman put request:</p>
  
  <pre><code>http://localhost:3000/api/actors/5daa8f1c5845ad0b5826b8d9?name=Tom
  </code></pre>
  
  <p>Postman response:</p>
  
  <pre><code>{
      "createdAt": "2019-10-19T04:16:13.317Z",
      "updatedAt": "2019-10-19T04:16:13.317Z",
      "_id": "5daa8f1c5845ad0b5826b8d9",
      "name": "scarlett johansson",
      "birthday": "1980-10-14T00:00:00.000Z",
      "country": "usa",
      "__v": 0
  }
  </code></pre>
  
  <p>I have also tried to use findByIdAndUpdate. Didn't get the result. Any help would be appreciated.</p>
  
  <p>Controller:</p>
  
  <pre><code>exports.updateActor = async(req, res, next) =&gt; {
      try {
          const actorId = req.params.actorId;
          const data    = req.body;
  
          const updateActor = await Actor.findById(actorId);
  
          updateActor.set(data);
  
          const actor = await updateActor.save();
  
          // res.status(200).json({ message: "Data has Updated Successfully!" });
          res.send(actor);
  
      } catch (err) {
          res.status(500).json({ message: err.message });
      }
  };
  </code></pre>
  
  <p>Router:</p>
  
  <pre><code>router.put('/actors/:actorId', Actor.updateActor);
  </code></pre>