diff --git a/controllers/tourController.js b/controllers/tourController.js index 421871bab95fe596b5f41a56d4b9acc7b5392aed..a693e2fda41197783cabb7f9266b2f20c2079f50 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