mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-17 03:05:13 +00:00
fix gateway issue
This commit is contained in:
@ -667,7 +667,10 @@ export class DeviceService {
|
|||||||
|
|
||||||
const devices = await Promise.all(
|
const devices = await Promise.all(
|
||||||
response.map(async (device: any) => {
|
response.map(async (device: any) => {
|
||||||
const deviceDetails = await this.getDeviceByDeviceTuyaUuid(device.id);
|
try {
|
||||||
|
const deviceDetails = await this.getDeviceByDeviceTuyaUuid(
|
||||||
|
device.id,
|
||||||
|
);
|
||||||
if (deviceDetails.deviceTuyaUuid) {
|
if (deviceDetails.deviceTuyaUuid) {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
const { id, ...rest } = device;
|
const { id, ...rest } = device;
|
||||||
@ -680,6 +683,9 @@ export class DeviceService {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
} catch (error) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user