Gitlab@Informatics

Skip to content
Snippets Groups Projects
Commit f1dad249 authored by 65160394's avatar 65160394
Browse files

Project Round 7

parent 6b75c61d
No related branches found
No related tags found
No related merge requests found
......@@ -84,7 +84,7 @@ exports.Logout = (req, res) => {
exports.getProfilePage = (req, res) => {
if (req.session.userId) {
// ส่งข้อมูลของผู้ใช้ไปที่หน้าโปรไฟล์
res.render('profile', { user, session: req.session });
res.render('profile', { user: req.session.userName, session: req.session });
} else {
// ถ้าไม่ได้ล็อกอิน ให้ไปที่หน้า login
res.redirect('/login');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment