mirror of
https://github.com/microsoft/TypeScript-Node-Starter.git
synced 2025-11-09 00:37:27 +00:00
added package-lock for npm5 and fixed bug with flash messages
This commit is contained in:
@@ -41,7 +41,7 @@ export let postLogin = (req: Request, res: Response, next: NextFunction) => {
|
||||
passport.authenticate("local", (err: Error, user: UserModel, info: LocalStrategyInfo) => {
|
||||
if (err) { return next(err); }
|
||||
if (!user) {
|
||||
req.flash("errors", info);
|
||||
req.flash("errors", info.message);
|
||||
return res.redirect("/login");
|
||||
}
|
||||
req.logIn(user, (err) => {
|
||||
|
||||
Reference in New Issue
Block a user