Zone rename, model rename, clear panel and locked panel API and socket completed
This commit is contained in:
@@ -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"){
|
||||
|
||||
Reference in New Issue
Block a user