mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-17 03:05:13 +00:00
Add project UUID filter to device query in DeviceService
This commit is contained in:
@ -960,7 +960,12 @@ export class DeviceService {
|
|||||||
await this.validateProject(param.projectUuid);
|
await this.validateProject(param.projectUuid);
|
||||||
|
|
||||||
const devices = await this.deviceRepository.find({
|
const devices = await this.deviceRepository.find({
|
||||||
where: { isActive: true },
|
where: {
|
||||||
|
isActive: true,
|
||||||
|
spaceDevice: {
|
||||||
|
community: { project: { uuid: param.projectUuid } },
|
||||||
|
},
|
||||||
|
},
|
||||||
relations: [
|
relations: [
|
||||||
'spaceDevice.parent',
|
'spaceDevice.parent',
|
||||||
'spaceDevice.community',
|
'spaceDevice.community',
|
||||||
|
Reference in New Issue
Block a user