Gitlab@Informatics

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

Project Round 3

parent e9b5bee9
No related branches found
No related tags found
No related merge requests found
......@@ -29,9 +29,7 @@ class Tour {
}
// สร้างทัวร์
static async createTour(tourData) {
const { name, description, price, duration } = tourData;
static async createTour(name, description, price, duration) {
// ตรวจสอบข้อมูล
if (!name || !price || !duration) {
throw new Error('ข้อมูลไม่ครบถ้วน กรุณากรอกข้อมูลให้ครบถ้วน');
......@@ -46,6 +44,7 @@ class Tour {
}
}
// อัปเดตทัวร์
static async updateTour(id, tourData) {
const { name, description, price, duration } = tourData;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment