socket Manager duplication of zone controller

This commit is contained in:
2025-06-03 11:30:52 +05:30
parent d5fa507617
commit 673d07ce37
5 changed files with 21 additions and 38 deletions

View File

@@ -278,7 +278,7 @@ export class ZoneService {
const { organization } = req.params;
const findZoneId = await zoneSchema(organization)
.find()
.find({ isArchive: false })
.select(
"zoneId zoneName layer points viewPortCenter viewPortposition -_id"
);
@@ -286,7 +286,7 @@ export class ZoneService {
if (!findZoneId) {
res.status(500).json({ message: "Invalid zone" });
}
res.status(201).json({ data: findZoneId, organization: organization });
res.status(200).json({ data: findZoneId, organization: organization });
} catch (error) {
console.log("error: ", error);
res.status(500).json({ message: "Zone not found", error });