Gitlab@Informatics

Skip to content
Snippets Groups Projects
Commit 9e9aea6b authored by 65160381's avatar 65160381
Browse files

9.9

parent d851115c
No related branches found
No related tags found
No related merge requests found
Pipeline #627 passed with warnings
...@@ -189,8 +189,8 @@ app.get('/api/user/products', (req, res) => { ...@@ -189,8 +189,8 @@ app.get('/api/user/products', (req, res) => {
// GET: ดึงข้อมูลสินค้าจากตะกร้า // GET: ดึงข้อมูลสินค้าจากตะกร้า
app.get('/api/cart', (req, res) => { app.get('/api/cart', (req, res) => {
// สมมติว่ามีตะกร้าใน session ของผู้ใช้ const cart = req.session.cart || []; // ใช้ session เก็บข้อมูลตะกร้า
const cart = req.session.cart || []; // สมมติว่าใช้ session สำหรับเก็บข้อมูลตะกร้า console.log('Cart:', cart); // ตรวจสอบข้อมูลในตะกร้า
res.json(cart); res.json(cart);
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment