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

---
 controllers/tourController.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/controllers/tourController.js b/controllers/tourController.js
index 421871b..a693e2f 100644
--- a/controllers/tourController.js
+++ b/controllers/tourController.js
@@ -293,7 +293,7 @@ exports.getUserBookings = async (req, res) => {
   console.log("Fetching bookings for user:", userId);
   try {
     const query = `
-      SELECT t.name AS tour_name, u.name AS user_name
+      SELECT b.id AS booking_id, t.name AS tour_name, u.name AS user_name
       FROM bookings b
       JOIN tours t ON b.tour_id = t.id
       JOIN users u ON b.user_id = u.id
-- 
GitLab