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