mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-16 02:36:19 +00:00
added log
This commit is contained in:
@ -30,7 +30,6 @@ export class SpaceDeviceService {
|
||||
HttpStatus.BAD_REQUEST,
|
||||
);
|
||||
}
|
||||
|
||||
const safeFetch = async (device: any) => {
|
||||
try {
|
||||
const tuyaDetails = await this.getDeviceDetailsByDeviceIdTuya(
|
||||
@ -48,7 +47,7 @@ export class SpaceDeviceService {
|
||||
};
|
||||
} catch (error) {
|
||||
console.warn(
|
||||
`Skipping device with deviceTuyaUuid: ${device.deviceTuyaUuid} due to error.`,
|
||||
`Skipping device with deviceTuyaUuid: ${device.deviceTuyaUuid} due to error. ${error}`,
|
||||
);
|
||||
return null;
|
||||
}
|
||||
|
@ -325,7 +325,7 @@ export class SpaceService {
|
||||
private async validateSpace(spaceUuid: string) {
|
||||
const space = await this.spaceRepository.findOne({
|
||||
where: { uuid: spaceUuid },
|
||||
relations: ['devices'],
|
||||
relations: ['devices', 'devices.productDevice'],
|
||||
});
|
||||
if (!space) this.throwNotFound('Space', spaceUuid);
|
||||
return space;
|
||||
|
Reference in New Issue
Block a user