score:5

Accepted answer

it should be req, res, next

change

function auth(res, req, next) {

to

function auth(req, res, next) {

https://expressjs.com/en/guide/using-middleware.html


Related Query

More Query from same tag