title: Express Next() return 404 not found
body: <p>I'm new with express and I dont have to much idea about the error that im getting.
  I have a middleware in mi app.js file to get the api information but before getting the information I'm checking if the user is logged or not. 
  If the user is logged I use the next() function to redirect the user to the next middleware but I'm getting a 404 error Not found.
  This is my middleware:</p>
  
  <pre><code>app.use('/api/advertisements',jwtAuth() ,require('./routes/api/advertisements'));
  </code></pre>
  
  <p>Code in jwtAuth();</p>
  
  <pre><code>module.exports = function(){ return (req, res, next) =&gt; { next(); }}
  </code></pre>
  
  <p>Thanks for the help.</p>