mesan-nodejs-auth-crud-api icon indicating copy to clipboard operation
mesan-nodejs-auth-crud-api copied to clipboard

The express-validator middleware and "role: basic"

Open EmmyMay opened this issue 5 years ago • 0 comments

Hi, lovely work btw but I can't seem to find how you are using the validator.js file. I felt it'd be used in the controllers to sanitize and validate the req.body but I can't find you requiring the script anywhere there.

Also, why is there a {role: basic} on the register controller where you created a new User? I ask because I cannot find a role field in the User document. I don't know if it is an express thing because I'm using Koa to build something similar to this.

EmmyMay avatar Jul 03 '20 14:07 EmmyMay