Builder Based projectID Service processing for camera,walll,lines, zones

This commit is contained in:
2025-05-28 13:01:55 +05:30
parent 2c28ffe9aa
commit 6b5bee879b
12 changed files with 453 additions and 44 deletions

View File

@@ -11,11 +11,10 @@ export const SetNewCamera = async (
res: Response
): Promise<void> => {
try {
const { organization, role, userId } = req.user || {};
const { organization, userId } = req.user || {};
const { position, target, rotation, projectId, versionId } = req.body;
if (
!organization ||
!role ||
!userId ||
!position ||
!target ||
@@ -35,7 +34,6 @@ export const SetNewCamera = async (
projectId,
versionId,
organization,
role,
userId,
};
const result = await SetCamera(data);
@@ -76,8 +74,8 @@ export const CameraList = async (
res: Response
): Promise<void> => {
try {
const { organization, role, userId } = req.user || {};
if (!organization || !role || !userId) {
const { organization, userId } = req.user || {};
if (!organization || !userId) {
res.status(400).json({
message: "All fields are required",
});
@@ -85,7 +83,6 @@ export const CameraList = async (
}
const result = await GetCamers({
organization,
role,
userId,
});