diff --git a/apps/drec-api/src/pods/certificate-log/certificate-log.service.ts b/apps/drec-api/src/pods/certificate-log/certificate-log.service.ts index a022b44c1..ca5f9a711 100755 --- a/apps/drec-api/src/pods/certificate-log/certificate-log.service.ts +++ b/apps/drec-api/src/pods/certificate-log/certificate-log.service.ts @@ -16,7 +16,7 @@ import { DeviceService } from '../device/device.service'; import { CertificateLogResponse, CertificateNewWithPerDeviceLog, - CertificateWithPerDevicelog, + CertificateWithPerDeviceLog, } from './dto'; import { DeviceGroupService } from '../device-group/device-group.service'; import { DeviceGroupDTO } from '../device-group/dto'; @@ -110,7 +110,7 @@ export class CertificateLogService { if (certificates.length > 0) { const logData = - await this.findCertifiedReservations( + await this.findCertifiedReservations( certificates, groupid, ); @@ -172,7 +172,7 @@ export class CertificateLogService { ): Promise { this.logger.verbose(`With in findCertifiedReservations`); return await Promise.all( - certificates.map(async (certificate: CertificateWithPerDevicelog) => + certificates.map(async (certificate: CertificateWithPerDeviceLog) => this.getCertifiedReservation( certificate, groupId, @@ -581,7 +581,7 @@ export class CertificateLogService { ): Promise<{ certificatelog: | CertificateNewWithPerDeviceLog[] - | CertificateWithPerDevicelog[]; + | CertificateWithPerDeviceLog[]; currentpage?: number; totalPages: number; totalCount: number; @@ -679,7 +679,7 @@ export class CertificateLogService { this.logger.debug(groupedDatasql); const result = await newq.getMany(); const res = await Promise.all( - result.map(async (certifiedlist: CertificateWithPerDevicelog) => { + result.map(async (certifiedlist: CertificateWithPerDeviceLog) => { certifiedlist.certificateStartDate = new Date( certifiedlist.generationStartTime * 1000, ).toISOString(); diff --git a/apps/drec-api/src/pods/certificate-log/dto/certificatewithdevicelog.dto.ts b/apps/drec-api/src/pods/certificate-log/dto/certificatewithdevicelog.dto.ts index 703d12183..c1a39dcd4 100755 --- a/apps/drec-api/src/pods/certificate-log/dto/certificatewithdevicelog.dto.ts +++ b/apps/drec-api/src/pods/certificate-log/dto/certificatewithdevicelog.dto.ts @@ -3,7 +3,7 @@ import { CheckCertificateIssueDateLogForDeviceEntity } from '../../device/check_ import { ICertificateReadModel } from '@energyweb/origin-247-certificate'; import { ICertificateMetadata } from '../../../utils/types'; -export class CertificateWithPerDevicelog extends Certificate { +export class CertificateWithPerDeviceLog extends Certificate { id: number; deviceId: string; generationStartTime: number; @@ -28,7 +28,7 @@ export class CertificateNewWithPerDeviceLog { export class CertificateLogResponse { certificatelog: | CertificateNewWithPerDeviceLog[] - | CertificateWithPerDevicelog[]; + | CertificateWithPerDeviceLog[]; totalPages: number; totalCount: number; }