refactor: userController and add req user type

This commit is contained in:
wancat committed 2024-02-19 23:51:21 +08:00
1 parent 4c421b4cb3
commit c912319967
8 files changed
+49 -23

No files matched your search

+1 -1
View File
@@ -5,7 +5,7 @@ export default function authRequired(
res: Response,
next: NextFunction
) {
if (req.isAuthenticated() && !('newUser' in req.session)) {
if (req.isAuthenticated() && !('newUser' in req.user)) {
next()
return
}