From 733ccee88db748db8ba15b3c04b55b2965ecb32b Mon Sep 17 00:00:00 2001 From: faris Aljohari <83524184+farisaljohari@users.noreply.github.com> Date: Mon, 17 Feb 2025 02:13:28 -0600 Subject: [PATCH] Add space device relation and space name to device details --- src/vistor-password/services/visitor-password.service.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vistor-password/services/visitor-password.service.ts b/src/vistor-password/services/visitor-password.service.ts index d0e1ff3..2f08f0c 100644 --- a/src/vistor-password/services/visitor-password.service.ts +++ b/src/vistor-password/services/visitor-password.service.ts @@ -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(