Sửa callout của hotspot hiển thị thumbnail và tooltip
This commit is contained in:
@@ -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 });
|
||||
|
||||
Reference in New Issue
Block a user