Zone rename, model rename, clear panel and locked panel API and socket completed

This commit is contained in:
2025-04-09 18:22:12 +05:30
parent c4d8fc14c8
commit 40eb9d8fb9
12 changed files with 450 additions and 124 deletions

View File

@@ -18,10 +18,11 @@ export class assetsFloorservice {
organization,
eventData,
} = req.body;
console.log("req.body: ", req.body);
const findvalue = await assetModel(organization).findOne({
modeluuid,
modelname,
// modelname,
isArchive: false,
});
const checkpointType = await pointModel(organization).findOne({
@@ -31,8 +32,9 @@ export class assetsFloorservice {
if (findvalue) {
const updatevalue = await assetModel(organization).findOneAndUpdate(
{ modeluuid, modelname, isArchive: false },
{ modeluuid, isArchive: false },
{
modelname: modelname,
position,
rotation,
isVisible,
@@ -63,18 +65,18 @@ export class assetsFloorservice {
.status(400)
.json({ message: "Vehicle points must be a single object" });
}
if (eventData.points.rotation) {
return res.status(400).json({
message: "Rotation is not allowed for Vehicle points",
});
}
// if (eventData.points.rotation) {
// return res.status(400).json({
// message: "Rotation is not allowed for Vehicle points",
// });
// }
if (eventData.points.triggers) {
return res.status(400).json({
message: "triggers is not allowed for Vehicle points",
});
}
}
}
// else if(eventData.type === "ArmBot"){
// assetData.speed = eventData.position;
// }else if(eventData.type === "StaticMachine"){