title: console says next is not defined
body: <p>am working on a project, and am triyng to verify my jwt token using a middleware, but am getting an error message in the console, it says "next is not defined",
  here is my code</p>
  
  <p>in login.js</p>
  
  <pre><code>const verifyy = require('./verifyJWT')
  
  module.exports = (req, res)=&gt; {
      verifyy(req, res, next)
  }
  </code></pre>
  
  <p>and in verifyJWT.js which is where the middleware is, here is the code</p>
  
  <pre><code>const jwt = require('jsonwebtoken')
  const fs = require('fs');
  
  var public = fs.readFileSync('./public.pem');
  
  module.exports = (req, res, next)=&gt; {
      var token = req.headers.authorization.split(' ')[1]
      if (!token) return res.status(401).send({ auth: false, message: 'No token provided.' });
      jwt.verify(token, public, function(err, decoded) {
          if (err) return res.status(500).send({ auth: false, message: 'Failed to authenticate token.' });
          next();
  
      });
  }
  </code></pre>
  
  <p>pls how can i solve this problem or what am i doing wrong</p>