1
0
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:
Bowden Kelly
2017-06-05 13:30:43 -07:00
parent 02627668f5
commit eb0494e85b
3 changed files with 5317 additions and 2 deletions

View File

@@ -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) => {