mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-26 08:54:54 +00:00
added community to all devices
This commit is contained in:
@ -832,6 +832,7 @@ export class DeviceService {
|
||||
where: { isActive: true },
|
||||
relations: [
|
||||
'spaceDevice.parent',
|
||||
'spaceDevice.community',
|
||||
'productDevice',
|
||||
'permission',
|
||||
'permission.permissionType',
|
||||
@ -886,6 +887,7 @@ export class DeviceService {
|
||||
const spaceHierarchy = await this.getFullSpaceHierarchy(
|
||||
device?.spaceDevice,
|
||||
);
|
||||
console.log(device.spaceDevice.community);
|
||||
const orderedHierarchy = spaceHierarchy.reverse();
|
||||
|
||||
return {
|
||||
@ -895,6 +897,10 @@ export class DeviceService {
|
||||
})),
|
||||
productUuid: device.productDevice.uuid,
|
||||
productType: device.productDevice.prodType,
|
||||
community: {
|
||||
uuid: device.spaceDevice.community.uuid,
|
||||
name: device.spaceDevice.community.name,
|
||||
},
|
||||
// permissionType: device.permission[0].permissionType.type,
|
||||
/* ...(await this.getDeviceDetailsByDeviceIdTuya(
|
||||
device.deviceTuyaUuid,
|
||||
|
||||
Reference in New Issue
Block a user