Gitlab@Informatics

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

Project Round 3

parent e90177aa
No related branches found
No related tags found
No related merge requests found
......@@ -15,6 +15,6 @@ router.get('/logout', tourController.Logout); // ออกจากระบบ
// สร้างทัวร์
router.get('/create', tourController.getCreateTour); // หน้าสร้างทัวร์
router.post('/create', tourController.createTour); // เพิ่ม route สำหรับการสร้างทัวร์โดยการ POST
router.post('/create', tourController.createTour); // บันทึกทัวร์ลงฐานข้อมูล
module.exports = router;
......@@ -25,7 +25,7 @@ app.use(express.json());
app.use('/', tourRoutes);
app.use('/login', tourRoutes);
app.use('/register', tourRoutes);
app.use('/tour', tourRoutes);
app.use('/create', tourRoutes);
const PORT = process.env.PORT || 3000;
app.listen(PORT, () => {
......
......@@ -12,7 +12,7 @@
</header>
<main>
<form action="/tour/create" method="POST">
<form action="/create" method="POST">
<div>
<label for="tourName">Tour Name:</label>
<input type="text" id="tourName" name="name" required>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment