Gitlab@Informatics

Skip to content
Snippets Groups Projects
Commit 2b639c50 authored by 65160394's avatar 65160394
Browse files

Project Round 3

parent 6493fcb1
Branches
No related tags found
No related merge requests found
......@@ -4,11 +4,13 @@ class Tour {
// ดึงทัวร์ทั้งหมด
static async getAllTours() {
try {
console.log('Fetching all tours...');
const [rows] = await pool.query('SELECT * FROM tours');
console.log('Tours fetched successfully:', rows);
return rows;
} catch (error) {
console.error('Error fetching tours:', error);
throw new Error('เกิดข้อผิดพลาดในการดึงข้อมูลทัวร์');
console.error('Error fetching tours:', error.message);
throw new Error('เกิดข้อผิดพลาดในการดึงข้อมูลทัวร์: ' + error.message);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment