diff --git a/controllers/tourController.js b/controllers/tourController.js index a0b4d09889d97dbced324a54f68c539801729bb5..c3a81b780cc57ded4be2450c1aa93e64707dc608 100644 --- a/controllers/tourController.js +++ b/controllers/tourController.js @@ -211,10 +211,10 @@ exports.postEditTour = async (req, res) => { } const tourData = { name, description, price, duration }; - const tourId = req.params.userId; + const tourId = id; console.log('Tour ID from URL:', tourId); - + if (!tourId) { return res.status(400).send('ไม่พบข้อมูลทัวร์'); }