mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-15 10:25:23 +00:00
Add space device relation and space name to device details
This commit is contained in:
@ -517,7 +517,7 @@ export class VisitorPasswordService {
|
||||
isActive: true,
|
||||
},
|
||||
|
||||
relations: ['productDevice'],
|
||||
relations: ['productDevice', 'spaceDevice'],
|
||||
});
|
||||
const devicesData = await Promise.all(
|
||||
devices?.map(async (device) => {
|
||||
@ -531,6 +531,7 @@ export class VisitorPasswordService {
|
||||
productType: device.productDevice.prodType,
|
||||
...deviceDetails,
|
||||
uuid: device.uuid,
|
||||
spaceName: device.spaceDevice.spaceName,
|
||||
} as GetDeviceDetailsInterface;
|
||||
} catch (error) {
|
||||
console.error(
|
||||
|
Reference in New Issue
Block a user