Open CameronSima opened 4 years ago
These lines wont do anything:
export const postLogin = (req: Request, res: Response, next: NextFunction) => { check("email", "Email is not valid").isEmail() check("password", "Password cannot be blank").isLength({min: 1})
the checks() are middleware, they need to be in the middleware chain, not in the middle of a function
These lines wont do anything:
export const postLogin = (req: Request, res: Response, next: NextFunction) => { check("email", "Email is not valid").isEmail() check("password", "Password cannot be blank").isLength({min: 1})
the checks() are middleware, they need to be in the middleware chain, not in the middle of a function