I have the following question with a middleware, if the middleware works the following way:
function middle(variable){
// codigo codigo
return function(req, res, next){
if(hrk !== 'jfk'){
if(variable){
next();
}
}
// codigo
// y
// mas codigo
next();
}
}
and a route works on this route:
router.get('/lala', middle(true), miControllador)
The problem is that it gets to where the variable that is a Boolean exists and
is in true
but the problem is that it does not pass to the next function middle
which would be miControllador
.