Gitlab@Informatics

Skip to content
Snippets Groups Projects
Commit 5eda1cee authored by 65160394's avatar 65160394
Browse files

Project Round 8

parent 197fd21c
No related branches found
No related tags found
No related merge requests found
...@@ -58,7 +58,7 @@ class Tour { ...@@ -58,7 +58,7 @@ class Tour {
// อัปเดตทัวร์ // อัปเดตทัวร์
static async updateTour(id, tourData) { static async updateTour(tourData) {
const { name, description, price, duration } = tourData; const { name, description, price, duration } = tourData;
if (!name || !description || !price || !duration) { if (!name || !description || !price || !duration) {
...@@ -68,7 +68,7 @@ class Tour { ...@@ -68,7 +68,7 @@ class Tour {
const query = 'UPDATE tours SET name = ?, description = ?, price = ?, duration = ? WHERE id = ?'; const query = 'UPDATE tours SET name = ?, description = ?, price = ?, duration = ? WHERE id = ?';
try { try {
const [results] = await pool.execute(query, [name, description, price, duration, id]); const [results] = await pool.execute(query, [name, description, price, duration]);
console.log('✅ Update results:', results); console.log('✅ Update results:', results);
return results; return results;
} catch (error) { } catch (error) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment