dt-common-device 13.0.0 → 13.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -255,7 +255,8 @@ let AdminRepository = (() => {
|
|
|
255
255
|
WHERE "id" = $1
|
|
256
256
|
`;
|
|
257
257
|
}
|
|
258
|
-
const
|
|
258
|
+
const params = propertyId ? [accessGroupId, propertyId] : [accessGroupId];
|
|
259
|
+
const result = await this.postgres.query(query, params);
|
|
259
260
|
if (result.rows.length > 0) {
|
|
260
261
|
return result.rows[0];
|
|
261
262
|
}
|
|
@@ -281,7 +282,8 @@ let AdminRepository = (() => {
|
|
|
281
282
|
else {
|
|
282
283
|
query = `SELECT * FROM dt_zones WHERE "id" = $1`;
|
|
283
284
|
}
|
|
284
|
-
const
|
|
285
|
+
const params = propertyId ? [zoneId, propertyId] : [zoneId];
|
|
286
|
+
const zone = await this.postgres.query(query, params);
|
|
285
287
|
if (zone.rows.length > 0) {
|
|
286
288
|
const zoneData = zone.rows[0];
|
|
287
289
|
const zoneType = await this.postgres.query(`SELECT * FROM "dt_zoneTypes" WHERE "id" = $1`, [zoneData.zoneTypeId]);
|