Hoàn thành việc chỉnh sửa quyền privacy giữa các tour và scene
This commit is contained in:
@@ -128,7 +128,7 @@ router.get('/:id', optionalAuth, async (req, res) => {
|
||||
}
|
||||
}
|
||||
|
||||
if (!hasAccess) return res.status(403).json({ message: 'Access denied' });
|
||||
if (!hasAccess) return res.status(403).json({ message: 'Bạn không được phép di chuyển đến cảnh này' });
|
||||
|
||||
// [BẢO MẬT] Một cảnh là cảnh con nếu nó thuộc về một tour và tourId khác với ID chính nó
|
||||
const isChild = scene.tourId && scene.tourId.toString() !== scene._id.toString();
|
||||
|
||||
Reference in New Issue
Block a user