hook up auth
This commit is contained in:
@@ -55,7 +55,7 @@ export async function login(req: Request, res: Response, next: NextFunction) {
|
||||
|
||||
req.login(user, (loginErr) => {
|
||||
if (loginErr) return next(loginErr);
|
||||
res.json({ id: user.id, email: user.email, name: user.name });
|
||||
res.redirect("/");
|
||||
});
|
||||
},
|
||||
)(req, res, next);
|
||||
|
||||
Reference in New Issue
Block a user