From 1c22b292e711064985aaba56712bfbad5fd3aaaf Mon Sep 17 00:00:00 2001 From: Atiwit Pattanapukdee <65160394@go.buu.ac.th> Date: Tue, 18 Mar 2025 14:06:08 +0700 Subject: [PATCH] Project Round 3 --- routes/tourRoutes.js | 1 + views/tour-details.ejs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/routes/tourRoutes.js b/routes/tourRoutes.js index a5a0805..30b88f7 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 5b43352..eaced6e 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> -- GitLab