diff --git a/routes/tourRoutes.js b/routes/tourRoutes.js index a5a08051a8ab7bf7d38d40f893c8e5d9aad133a2..30b88f78b11f48ce51ae939629562fe0c21c1ac0 100644 --- a/routes/tourRoutes.js +++ b/routes/tourRoutes.js @@ -19,5 +19,6 @@ router.post('/create', tourController.createTour); // บันทึกทั //แก้ไขทัวร์ router.get('/edit/:id', tourController.getEditTour); // หน้ารายละเอียดของทัวร์ +router.get('/post/:id', tourController.postEditTour); // บันทึกทัวร์ลงฐานข้อมูล module.exports = router; diff --git a/views/tour-details.ejs b/views/tour-details.ejs index 5b4335283559449c429db1df3aad587cee9cd4e9..eaced6e61d79b4fe9f4be6e18f463b64bd8566d5 100644 --- a/views/tour-details.ejs +++ b/views/tour-details.ejs @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title><%= tour.name %> - Tour Details</title> - <link rel="stylesheet" href="/css/styles.css"> + <link rel="stylesheet" href="/css/login.css"> </head> <body> <header> @@ -15,6 +15,7 @@ <h2>Description</h2> <p><%= tour.description %></p> <p>Price: <%= tour.price %> THB</p> + <a href="/" class="btn-edit">ย้อนกลับ</a> </section> <footer>