mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-27 01:59:48 +00:00
refactor(nestjs): hook the new endpoints
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user