mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-10 07:07:21 +00:00
fix: check if device not found (#458)
This commit is contained in:
@ -717,6 +717,9 @@ export class DeviceService {
|
|||||||
relations: ['productDevice'],
|
relations: ['productDevice'],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (!deviceDetails) {
|
||||||
|
throw new NotFoundException('Device not found');
|
||||||
|
}
|
||||||
let result = await this.tuyaService.getDeviceDetails(deviceId);
|
let result = await this.tuyaService.getDeviceDetails(deviceId);
|
||||||
|
|
||||||
if (!result) {
|
if (!result) {
|
||||||
|
Reference in New Issue
Block a user