From c44d0fb28a3d268d2998cdf4d0d11f779e5ae2a4 Mon Sep 17 00:00:00 2001
From: 65160381 <65160381@go.buu.ac.th>
Date: Fri, 28 Mar 2025 11:03:12 +0000
Subject: [PATCH] Update 23 files

- /controllers/reviewController.js
- /controllers/registerController.js
- /controllers/productController.js
- /controllers/logoutController.js
- /controllers/loginController.js
- /controllers/indexController.js
- /controllers/cartController.js
- /views/searchResults.ejs
- /views/reviews.ejs
- /views/register.ejs
- /views/product.ejs
- /views/orderHistory.ejs
- /views/orderConfirmation.ejs
- /views/login.ejs
- /views/index.ejs
- /views/editReview.ejs
- /views/editProduct.ejs
- /views/cart.ejs
- /views/addProduct.ejs
- /package.json
- /package-lock.json
- /db.js
- /app.js
---
 app.js                            | 1 +
 controllers/cartController.js     | 2 +-
 controllers/indexController.js    | 2 +-
 controllers/loginController.js    | 2 +-
 controllers/logoutController.js   | 2 +-
 controllers/productController.js  | 2 +-
 controllers/registerController.js | 1 +
 controllers/reviewController.js   | 1 +
 db.js                             | 1 +
 package-lock.json                 | 1 +
 package.json                      | 1 +
 views/addProduct.ejs              | 1 +
 views/cart.ejs                    | 1 +
 views/editProduct.ejs             | 1 +
 views/editReview.ejs              | 1 +
 views/index.ejs                   | 3 ++-
 views/login.ejs                   | 3 ++-
 views/orderConfirmation.ejs       | 1 +
 views/orderHistory.ejs            | 1 +
 views/product.ejs                 | 1 +
 views/register.ejs                | 3 ++-
 views/reviews.ejs                 | 1 +
 views/searchResults.ejs           | 1 +
 23 files changed, 26 insertions(+), 8 deletions(-)

diff --git a/app.js b/app.js
index 3ae9dfb..4017b09 100644
--- a/app.js
+++ b/app.js
@@ -61,3 +61,4 @@ const port = process.env.PORT || 3000;
 app.listen(port, () => {
     console.log(`Server running on port ${port}`);
 });
+   
\ No newline at end of file
diff --git a/controllers/cartController.js b/controllers/cartController.js
index 675b929..7979c9d 100644
--- a/controllers/cartController.js
+++ b/controllers/cartController.js
@@ -94,4 +94,4 @@ exports.checkout = async (req, res) => {
     } catch (err) {
         res.status(500).send('เกิดข้อผิดพลาดในการสั่งซื้อ: ' + err.message);
     }
-};
\ No newline at end of file
+};   
\ No newline at end of file
diff --git a/controllers/indexController.js b/controllers/indexController.js
index 932af7d..8debd81 100644
--- a/controllers/indexController.js
+++ b/controllers/indexController.js
@@ -27,4 +27,4 @@ exports.getProducts = async (req, res) => {
       res.status(500).send('Database error: ' + err.message);
     }
   };
-  
\ No newline at end of file
+     
\ No newline at end of file
diff --git a/controllers/loginController.js b/controllers/loginController.js
index 5e69712..46ecd5a 100644
--- a/controllers/loginController.js
+++ b/controllers/loginController.js
@@ -29,5 +29,5 @@ module.exports = {
             console.error(err);
             res.status(500).send('Server error');
         }
-    }
+    }   
 };
diff --git a/controllers/logoutController.js b/controllers/logoutController.js
index 712c536..c37b3be 100644
--- a/controllers/logoutController.js
+++ b/controllers/logoutController.js
@@ -2,4 +2,4 @@ module.exports = (req, res) => {
     req.session.destroy(() => {
         res.redirect('/')
     })
-}
\ No newline at end of file
+}   
\ No newline at end of file
diff --git a/controllers/productController.js b/controllers/productController.js
index a7cc93a..b6b1252 100644
--- a/controllers/productController.js
+++ b/controllers/productController.js
@@ -188,5 +188,5 @@ exports.orderHistory = async (req, res) => {
     }
 };
 
-
+   
   
\ No newline at end of file
diff --git a/controllers/registerController.js b/controllers/registerController.js
index be10a4e..a47476e 100644
--- a/controllers/registerController.js
+++ b/controllers/registerController.js
@@ -29,3 +29,4 @@ module.exports = {
     }
 };
 
+   
\ No newline at end of file
diff --git a/controllers/reviewController.js b/controllers/reviewController.js
index 1269335..cded546 100644
--- a/controllers/reviewController.js
+++ b/controllers/reviewController.js
@@ -93,3 +93,4 @@ exports.updateReview = async (req, res) => {
         res.status(500).send('เกิดข้อผิดพลาด: ' + err.message);
     }
 };
+   
\ No newline at end of file
diff --git a/db.js b/db.js
index 0f80718..655b527 100644
--- a/db.js
+++ b/db.js
@@ -13,3 +13,4 @@ const pool = mysql.createPool({
 
 module.exports = pool;
 
+   
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index e2d245b..f9a7fb4 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -2090,3 +2090,4 @@
     }
   }
 }
+   
\ No newline at end of file
diff --git a/package.json b/package.json
index 2239846..b7cb4c3 100644
--- a/package.json
+++ b/package.json
@@ -21,3 +21,4 @@
     "nodemon": "^3.1.9"
   }
 }
+   
\ No newline at end of file
diff --git a/views/addProduct.ejs b/views/addProduct.ejs
index 9b9e432..e1b123e 100644
--- a/views/addProduct.ejs
+++ b/views/addProduct.ejs
@@ -129,3 +129,4 @@ a:hover {
 <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.0/js/bootstrap.bundle.min.js"></script>
 </body>
 </html>
+   
\ No newline at end of file
diff --git a/views/cart.ejs b/views/cart.ejs
index 496476f..38fef9c 100644
--- a/views/cart.ejs
+++ b/views/cart.ejs
@@ -165,3 +165,4 @@ a:hover {
 <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.0/js/bootstrap.bundle.min.js"></script>
 </body>
 </html>
+   
\ No newline at end of file
diff --git a/views/editProduct.ejs b/views/editProduct.ejs
index 53c94bc..62f2caf 100644
--- a/views/editProduct.ejs
+++ b/views/editProduct.ejs
@@ -115,3 +115,4 @@ a:hover {
 <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.0/js/bootstrap.bundle.min.js"></script>
 </body>
 </html>
+   
\ No newline at end of file
diff --git a/views/editReview.ejs b/views/editReview.ejs
index bdb6b21..f8af577 100644
--- a/views/editReview.ejs
+++ b/views/editReview.ejs
@@ -15,3 +15,4 @@
 </div>
 </body>
 </html>
+   
\ No newline at end of file
diff --git a/views/index.ejs b/views/index.ejs
index ed90e49..e3baa63 100644
--- a/views/index.ejs
+++ b/views/index.ejs
@@ -113,4 +113,5 @@
       <script src="js/jquery.mCustomScrollbar.concat.min.js"></script>
       <script src="js/custom.js"></script>     
    </body>
-</html>
\ No newline at end of file
+</html>
+   
\ No newline at end of file
diff --git a/views/login.ejs b/views/login.ejs
index ede668b..e5c1d09 100644
--- a/views/login.ejs
+++ b/views/login.ejs
@@ -188,4 +188,5 @@
 <script src="/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
 
     </body>
-</html>
\ No newline at end of file
+</html>
+   
\ No newline at end of file
diff --git a/views/orderConfirmation.ejs b/views/orderConfirmation.ejs
index b8f0cb9..0e079e4 100644
--- a/views/orderConfirmation.ejs
+++ b/views/orderConfirmation.ejs
@@ -95,3 +95,4 @@
 <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.0/js/bootstrap.bundle.min.js"></script>
 </body>
 </html>
+   
\ No newline at end of file
diff --git a/views/orderHistory.ejs b/views/orderHistory.ejs
index 052eafb..999a232 100644
--- a/views/orderHistory.ejs
+++ b/views/orderHistory.ejs
@@ -125,3 +125,4 @@ body {
 <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.0/js/bootstrap.bundle.min.js"></script>
 </body>
 </html>
+   
\ No newline at end of file
diff --git a/views/product.ejs b/views/product.ejs
index 7c3799f..06e093c 100644
--- a/views/product.ejs
+++ b/views/product.ejs
@@ -106,3 +106,4 @@
 <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
 </body>
 </html>
+    
\ No newline at end of file
diff --git a/views/register.ejs b/views/register.ejs
index 2f12282..ae7771d 100644
--- a/views/register.ejs
+++ b/views/register.ejs
@@ -173,4 +173,5 @@
 <script src="/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
 
     </body>
-</html>
\ No newline at end of file
+</html>
+   
\ No newline at end of file
diff --git a/views/reviews.ejs b/views/reviews.ejs
index dfaedf4..7df9515 100644
--- a/views/reviews.ejs
+++ b/views/reviews.ejs
@@ -39,3 +39,4 @@
 </div>
 </body>
 </html>
+   
\ No newline at end of file
diff --git a/views/searchResults.ejs b/views/searchResults.ejs
index 4907156..ae3a6d0 100644
--- a/views/searchResults.ejs
+++ b/views/searchResults.ejs
@@ -104,3 +104,4 @@ body {
 <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.0/js/bootstrap.bundle.min.js"></script>
 </body>
 </html>
+   
\ No newline at end of file
-- 
GitLab