From 5b4b638ba7277c02f49d248e073c51fe1e793896 Mon Sep 17 00:00:00 2001 From: 65160258 <65160258@go.buu.ac.th> Date: Tue, 25 Mar 2025 11:55:42 +0700 Subject: [PATCH] index --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 0b93c71..efc2feb 100644 --- a/app.js +++ b/app.js @@ -50,7 +50,7 @@ app.get('/', (req, res) => { // หน้า Index (เฉพาะผู้ที่ล็อกอิน) // ตัวอย่างใน app.js app.get('/index', async (req, res) => { - if (!req.session.user) return res.redirect('/'); + if (!req.session.user) return res.redirect('/index'); try { const categoryId = req.query.category || ''; // รับค่า category จาก query parameter const params = []; -- GitLab