From fa141017cc43506fc745116d1317568238d9e81c Mon Sep 17 00:00:00 2001
From: Atiwit Pattanapukdee <65160394@go.buu.ac.th>
Date: Thu, 20 Mar 2025 22:58:29 +0700
Subject: [PATCH] Project Round 9

---
 controllers/tourController.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/controllers/tourController.js b/controllers/tourController.js
index 736e026..7f8a9f1 100644
--- a/controllers/tourController.js
+++ b/controllers/tourController.js
@@ -211,11 +211,11 @@ exports.getEditTour = async (req, res) => {
     }
 
     // ตรวจสอบว่ามี userId ใน tour หรือไม่
-    if (!tour.user_id) {
+    if (!tour.user_Id) {
       return res.status(500).send('ข้อมูลทัวร์ไม่สมบูรณ์');
     }
 
-    if (tour.user_id !== req.session.userId) {
+    if (tour.user_Id !== req.session.userId) {
       return res.status(403).send('คุณไม่มีสิทธิ์แก้ไขทัวร์นี้');
     }
 
-- 
GitLab