refactor(nestjs): hook the new endpoints

This commit is contained in:
Ahmed Bouhuolia
2025-05-22 19:55:55 +02:00
parent 4e64a9eadb
commit 2b3f98d8fe
12 changed files with 258 additions and 230 deletions

View File

@@ -1,15 +1,15 @@
import { Injectable } from "@nestjs/common";
import { BillPaymentsApplication } from "../BillPaymentsApplication.service";
import { Exportable } from "@/modules/Export/Exportable";
import { EXPORT_SIZE_LIMIT } from "@/modules/Export/constants";
import { ExportableService } from "@/modules/Export/decorators/ExportableModel.decorator";
import { BillPayment } from "../models/BillPayment";
import { Injectable } from '@nestjs/common';
import { BillPaymentsApplication } from '../BillPaymentsApplication.service';
import { Exportable } from '@/modules/Export/Exportable';
import { EXPORT_SIZE_LIMIT } from '@/modules/Export/constants';
import { ExportableService } from '@/modules/Export/decorators/ExportableModel.decorator';
import { BillPayment } from '../models/BillPayment';
@Injectable()
@ExportableService({ name: BillPayment.name })
export class BillPaymentsExportable extends Exportable {
constructor(
private readonly billPaymentsApplication: BillPaymentsApplication
private readonly billPaymentsApplication: BillPaymentsApplication,
) {
super();
}
@@ -30,13 +30,11 @@ export class BillPaymentsExportable extends Exportable {
...query,
page: 1,
pageSize: EXPORT_SIZE_LIMIT,
filterQuery
filterQuery,
} as any;
return [];
// return this.billPaymentsApplication
// .billPayments(tenantId, parsedQuery)
// .then((output) => output.billPayments);
return this.billPaymentsApplication
.getBillPayments(parsedQuery)
.then((output) => output.billPayments);
}
}