Gitlab@Informatics

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

Project Round 8

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