Sửa callout của hotspot hiển thị thumbnail và tooltip

This commit is contained in:
2026-06-08 17:35:40 +07:00
parent 3dbf2f2bbf
commit 306d95009f
5 changed files with 170 additions and 13 deletions
+8 -1
View File
@@ -246,7 +246,14 @@ router.get('/scenes/:id', optionalAuth, async (req, res) => {
*/
router.get('/hotspots/:scene_id', async (req, res) => {
try {
const hotspots = await Hotspot.find({ parent_scene_id: req.params.scene_id });
const hotspots = await Hotspot.find({ parent_scene_id: req.params.scene_id })
.populate({
path: 'target_scene_id',
select: 'name title assetId privacy shareToken',
populate: { path: 'assetId', select: '_id' }
})
.lean();
res.json(hotspots);
} catch (error) {
res.status(500).json({ message: error.message });