Gitlab@Informatics

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

Project Round 9

parent 40a1f129
No related branches found
No related tags found
No related merge requests found
...@@ -211,11 +211,11 @@ exports.getEditTour = async (req, res) => { ...@@ -211,11 +211,11 @@ exports.getEditTour = async (req, res) => {
} }
// ตรวจสอบว่ามี userId ใน tour หรือไม่ // ตรวจสอบว่ามี userId ใน tour หรือไม่
if (!tour.user_id) { if (!tour.user_Id) {
return res.status(500).send('ข้อมูลทัวร์ไม่สมบูรณ์'); return res.status(500).send('ข้อมูลทัวร์ไม่สมบูรณ์');
} }
if (tour.user_id !== req.session.userId) { if (tour.user_Id !== req.session.userId) {
return res.status(403).send('คุณไม่มีสิทธิ์แก้ไขทัวร์นี้'); return res.status(403).send('คุณไม่มีสิทธิ์แก้ไขทัวร์นี้');
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment