fix some issues

This commit is contained in:
faris Aljohari
2024-03-24 10:51:17 +03:00
parent 57fb43f47b
commit ed210e94c7

View File

@ -74,9 +74,8 @@ export class DeviceService {
} }
async getDevicesByGroupId(getDeviceByGroupIdDto: GetDeviceByGroupIdDto) { async getDevicesByGroupId(getDeviceByGroupIdDto: GetDeviceByGroupIdDto) {
try { try {
const devicesIds = await this.getDevicesByGroupIdTuya( const devicesIds: GetDevicesByGroupIdInterface =
getDeviceByGroupIdDto, await this.getDevicesByGroupIdTuya(getDeviceByGroupIdDto);
);
const devicesDetails = await Promise.all( const devicesDetails = await Promise.all(
devicesIds.result.data_list.map(async (device: any) => { devicesIds.result.data_list.map(async (device: any) => {
const deviceData = await this.getDevicesByDeviceId(device.dev_id); const deviceData = await this.getDevicesByDeviceId(device.dev_id);