mirror of
https://github.com/SyncrowIOT/backend.git
synced 2026-10-25 20:27:55 +00:00
Implement month-based date formatting and filtering in PowerClamp service
This commit is contained in:
@@ -133,7 +133,7 @@ export class SpaceDeviceService {
|
||||
async getAllDevicesBySpace(spaceUuid: string): Promise<DeviceEntity[]> {
|
||||
const space = await this.spaceRepository.findOne({
|
||||
where: { uuid: spaceUuid },
|
||||
relations: ['children', 'devices'],
|
||||
relations: ['children', 'devices', 'devices.productDevice'],
|
||||
});
|
||||
|
||||
if (!space) {
|
||||
@@ -146,7 +146,7 @@ export class SpaceDeviceService {
|
||||
const fetchChildren = async (parentSpace: SpaceEntity) => {
|
||||
const children = await this.spaceRepository.find({
|
||||
where: { parent: { uuid: parentSpace.uuid } },
|
||||
relations: ['children', 'devices'],
|
||||
relations: ['children', 'devices', 'devices.productDevice'],
|
||||
});
|
||||
|
||||
for (const child of children) {
|
||||
|
||||
Reference in New Issue
Block a user