From ecb4abc2904e692fc06bf044a1fafb0047fe8933 Mon Sep 17 00:00:00 2001 From: Atiwit Pattanapukdee <65160394@go.buu.ac.th> Date: Tue, 18 Mar 2025 13:38:35 +0700 Subject: [PATCH] Project Round 3 --- controllers/tourController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/tourController.js b/controllers/tourController.js index 416c6b3..8572efd 100644 --- a/controllers/tourController.js +++ b/controllers/tourController.js @@ -115,7 +115,7 @@ exports.postCreateTour = async (req, res) => { } try { - await Tour.create(name, description, price, duration); // สร้างทัวร์ + await Tour.createTour(name, description, price, duration); // สร้างทัวร์ res.redirect('/'); // กลับไปหน้าแรกหลังจากสร้างเสร็จ } catch (error) { console.error(error); -- GitLab