From e6cdace77ac8cb63e76ed96e615e6f44dc877241 Mon Sep 17 00:00:00 2001 From: NamrataSweya Date: Fri, 24 May 2024 13:12:54 +0530 Subject: [PATCH 1/3] added internalexternal id in get my devcie api response --- .../src/pods/device-group/device-group.service.ts | 2 +- apps/drec-api/src/pods/device/device.service.ts | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/apps/drec-api/src/pods/device-group/device-group.service.ts b/apps/drec-api/src/pods/device-group/device-group.service.ts index 63ee23f2c..785c59310 100755 --- a/apps/drec-api/src/pods/device-group/device-group.service.ts +++ b/apps/drec-api/src/pods/device-group/device-group.service.ts @@ -476,7 +476,7 @@ export class DeviceGroupService { this.logger.verbose(`With in getBuyerDeviceGroups`); let deviceGroups: any; let queryBuilder: any; - const pageSize = 10; + let pageSize = 10; if (!groupfilterDto || Object.keys(groupfilterDto).length === 0) { queryBuilder = this.repository diff --git a/apps/drec-api/src/pods/device/device.service.ts b/apps/drec-api/src/pods/device/device.service.ts index cb083c1a8..1a9462960 100755 --- a/apps/drec-api/src/pods/device/device.service.ts +++ b/apps/drec-api/src/pods/device/device.service.ts @@ -93,7 +93,7 @@ export class DeviceService { private readonly userService: UserService, @InjectRepository(DeviceLateongoingIssueCertificateEntity) private readonly latedevciecertificaterepository: Repository, - ) {} + ) { } public async find( filterDto: FilterDTO, @@ -183,8 +183,10 @@ export class DeviceService { const currentPage = pagenumber; const newDevices = []; await devices.map((device: Device) => { + device['internalexternalId'] = device.externalId; device.externalId = device.developerExternalId; delete device['developerExternalId']; + delete device['organization']; newDevices.push(device); @@ -206,6 +208,7 @@ export class DeviceService { //devices.externalId = devices.developerExternalId const newDevices = []; await devices.map((device: Device) => { + device['internalexternalId'] = device.externalId; device.externalId = device.developerExternalId; delete device['developerExternalId']; delete device['organization']; @@ -645,10 +648,10 @@ export class DeviceService { const rule = role === Role.DeviceOwner ? { - where: { - organizationId, - }, - } + where: { + organizationId, + }, + } : undefined; let currentDevice = await this.findDeviceByDeveloperExternalId( externalId.trim(), From 2d2aca971544aa5c388f1b4230e3522ef702edfd Mon Sep 17 00:00:00 2001 From: NamrataSweya Date: Fri, 24 May 2024 13:29:14 +0530 Subject: [PATCH 2/3] fixed prettier issue --- .../src/pods/device-group/device-group.service.ts | 2 +- apps/drec-api/src/pods/device/device.service.ts | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/drec-api/src/pods/device-group/device-group.service.ts b/apps/drec-api/src/pods/device-group/device-group.service.ts index 785c59310..63ee23f2c 100755 --- a/apps/drec-api/src/pods/device-group/device-group.service.ts +++ b/apps/drec-api/src/pods/device-group/device-group.service.ts @@ -476,7 +476,7 @@ export class DeviceGroupService { this.logger.verbose(`With in getBuyerDeviceGroups`); let deviceGroups: any; let queryBuilder: any; - let pageSize = 10; + const pageSize = 10; if (!groupfilterDto || Object.keys(groupfilterDto).length === 0) { queryBuilder = this.repository diff --git a/apps/drec-api/src/pods/device/device.service.ts b/apps/drec-api/src/pods/device/device.service.ts index 1a9462960..f1dad7086 100755 --- a/apps/drec-api/src/pods/device/device.service.ts +++ b/apps/drec-api/src/pods/device/device.service.ts @@ -93,7 +93,7 @@ export class DeviceService { private readonly userService: UserService, @InjectRepository(DeviceLateongoingIssueCertificateEntity) private readonly latedevciecertificaterepository: Repository, - ) { } + ) {} public async find( filterDto: FilterDTO, @@ -648,10 +648,10 @@ export class DeviceService { const rule = role === Role.DeviceOwner ? { - where: { - organizationId, - }, - } + where: { + organizationId, + }, + } : undefined; let currentDevice = await this.findDeviceByDeveloperExternalId( externalId.trim(), From 43fbec0c94629a1c047d069509aa92136669402b Mon Sep 17 00:00:00 2001 From: NamrataSweya Date: Fri, 24 May 2024 13:39:18 +0530 Subject: [PATCH 3/3] new verison update --- version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version b/version index cf648a75b..424a70f38 100755 --- a/version +++ b/version @@ -1 +1 @@ -0.0.117 +0.0.118