mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
feat: add loggedIn checks for frontend
This commit is contained in:
1 parent
34c277c886
commit
d939b7eb4d
5 files changed
+37
-21
No files matched your search
@@ -121,3 +121,9 @@ export function logout(req, res) {
|
||||
res.redirect('/login')
|
||||
})
|
||||
}
|
||||
|
||||
export function checkSession(req, res) {
|
||||
res.json({
|
||||
loggedIn: req.isAuthenticated(),
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user