title: findOneAndUpdate Mongoose w/ PUT REST API
body: <p>This is my first attempt at this, it's very simple, I just want to find all documents with provided parameter (box: "Box 1") and of those find all the documents with the provided property (supplies: "Cleaning"). Then update all of those documents from box: "Box 1" to box: "Box 2". The result would be all cleaning supplies are now moved to Box 2. So a document would go from {box: "Box 1", supplies: "Cleaning"} to {box: "Box 2", supplies: "Cleaning"}</p>
  
  <p><strong>Error</strong></p>
  
  <pre><code>"Cannot PUT /updatebox/Box%201/Cleaning" //in Postman
  "404 Not Found" //in Postman log
  </code></pre>
  
  <p><strong>Schema &amp; Model</strong></p>
  
  <pre><code>var boxSchema = new mongoose.Schema({
      box: String,
      supplies: String
  });
  
  var boxModel = mongoose.model('boxModel', boxSchema, 'boxList');
  </code></pre>
  
  <p><strong>API</strong></p>
  
  <pre><code>app.put('updatebox/:box/:supplies', function (req, res) {
      var boxReq = req.params.box;
      var suppliesReq = req.params.supplies;
      boxModel
          .find({box: boxReq})
          .findOneAndUpdate({supplies: suppliesReq}, {
              $set: {
                  box: "Box 2"
              }
          }, {new: true}, function (err, doc) {
              if (err) {
                  console.log("Something wrong when updating data!");
              }
              res.json(doc);
          });
  })
  </code></pre>