added controller

This commit is contained in:
hannathkadher
2024-10-31 10:14:59 +04:00
parent f1c07360cb
commit f28fa627ed
5 changed files with 23 additions and 31 deletions

View File

@ -614,12 +614,12 @@ export class DeviceService {
}
}
async getDevicesInstructionStatus(deviceUuid: string) {
const deviceDetails = await this.getDeviceByDeviceUuid(deviceUuid);
if (!deviceDetails) {
throw new NotFoundException('Device Not Found');
}
try {
const deviceDetails = await this.getDeviceByDeviceUuid(deviceUuid);
if (!deviceDetails) {
throw new NotFoundException('Device Not Found');
}
const deviceStatus = await this.getDevicesInstructionStatusTuya(
deviceDetails.deviceTuyaUuid,
);
@ -902,12 +902,12 @@ export class DeviceService {
name: device.spaceDevice.community.name,
},
// permissionType: device.permission[0].permissionType.type,
/* ...(await this.getDeviceDetailsByDeviceIdTuya(
...(await this.getDeviceDetailsByDeviceIdTuya(
device.deviceTuyaUuid,
)),*/
)),
uuid: device.uuid,
...(battery && { battery }),
};
} as GetDeviceDetailsInterface;
}),
);