title: Cannot delete error CRUD API (NodeJS, MongoDB, Express)
body: <p>I'm getting an error while trying to delete a field from a mongo database I created in an API project I'm working on. I'm still very much new to not only RESTful APIs but also MongoDB and Express. I followed a tutorial on Youtube that explained the steps to go through to make such an API and so I did and everything worked perfectly. Now I'm trying to reproduce this API using my own custom fields.</p>
  
  <p>Basically my database is populated with two elements right now. I've already created get, add and update methods that work properly. Here is the response for the get method :</p>
  
  <pre><code>[{"_id":"58a112564cb325769b9d90de","name":"John Doe","caption":"I like pizza","friends":["id1","id2","id3"],"schedule":[[13,14],[14,15.5]]},{"_id":"58a1178da52bfc07fd25ce3f","name":"Carla Doe","caption":"I hate pizza","__v":0,"friends":null,"schedule":null}]
  </code></pre>
  
  <p>Now the function that has an issue is the delete function. I can't seem to find what might be wrong with it. It is the exact same function as in the aformentioned Youtube tutorial. I've checked a hundred times over, there is no character wrong or missing.</p>
  
  <p>Here is the error I get in postman :</p>
  
  <pre><code>Cannot DELETE /api/clients/58a1178da52bfc07fd25ce3f
  </code></pre>
  
  <p>Here is the server.js part :</p>
  
  <pre><code>// Delete client
  app.delete('api/clients/:_id', function(req, res){
      var id = req.params._id;
      Client.deleteClient(id, function(err, client){
          if(err){
              throw err;
          }
          else {
              res.json(client);
          }
      });
   });
  </code></pre>
  
  <p>Here is the clients.js part :</p>
  
  <pre><code>// Delete Clients
  module.exports.deleteClient = function (id, client, callback) {
       var query = {_id: id};
      Client.remove(query, client, callback);
  };
  </code></pre>
  
  <p>I don't know if I'm giving you all the information needed to resolve the issue. I can't for the love of me find out where it's coming from.</p>
  
  <p>Looking forward to read your answers.</p>