title: why ID is not defined?
body: <p>When i send DELETE request i got message error
  <code>ReferenceError: id is not defined</code>
  <code>at Object.removeOne (...\services\user.js:16:38</code></p>
  
  <p>I have no idea what id about in \services\user.js, and why it is not defined...</p>
  
  <p><strong>./generalRepository.js</strong></p>
  
  <pre><code>function Repository() {}
  Repository.prototype.findAndRemoveById = findAndRemoveById;
  
  function findAndRemoveById(id, callback) {
    var model = this.model;
    var query = model.deleteOne({
      _id: id
    });
    query.exec(callback);
  }
  
  module.exports = Repository;
  </code></pre>
  
  <p><strong>.routers/user.js</strong></p>
  
  <pre><code>const router = require("express").Router();
  const userService = require("../../services/user");
  
  router.delete("/:id", (req, res, next) =&gt; {
    userService.removeOne(String(req.params.id), (err, data) =&gt; {
      if (!err) {
        res.send('success delete query');
      } else {
        console.log("wrong delete query");
        res.status(400);
        res.end();
      }
    });
  });
  
  module.exports = router;
  </code></pre>
  
  <p><strong>.services/user.js</strong></p>
  
  <pre><code>const UserRepository = require("../repositories/UserRepository");
  
  module.exports = {
    removeOne: () =&gt; {
      UserRepository.findAndRemoveById(id, (err, data) =&gt; {
        callback(err, data);
      });
    }
  };
  </code></pre>