Skip to content

Commit

Permalink
fix:implement requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
divinecharlotte committed Dec 9, 2024
1 parent 40e941d commit 4b95bee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -110,7 +110,7 @@ export class CertificateLogService {

if (certificates.length > 0) {
const logData =
await this.findCertifiedReservations<CertificateWithPerDevicelog>(
await this.findCertifiedReservations<CertificateWithPerDeviceLog>(
certificates,
groupid,
);
Expand Down Expand Up @@ -172,7 +172,7 @@ export class CertificateLogService {
): Promise<T[]> {
this.logger.verbose(`With in findCertifiedReservations`);
return await Promise.all(
certificates.map(async (certificate: CertificateWithPerDevicelog) =>
certificates.map(async (certificate: CertificateWithPerDeviceLog) =>
this.getCertifiedReservation(
certificate,
groupId,
Expand Down Expand Up @@ -581,7 +581,7 @@ export class CertificateLogService {
): Promise<{
certificatelog:
| CertificateNewWithPerDeviceLog[]
| CertificateWithPerDevicelog[];
| CertificateWithPerDeviceLog[];
currentpage?: number;
totalPages: number;
totalCount: number;
Expand Down Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -28,7 +28,7 @@ export class CertificateNewWithPerDeviceLog {
export class CertificateLogResponse {
certificatelog:
| CertificateNewWithPerDeviceLog[]
| CertificateWithPerDevicelog[];
| CertificateWithPerDeviceLog[];
totalPages: number;
totalCount: number;
}

0 comments on commit 4b95bee

Please sign in to comment.