diff --git a/.changeset/bright-coats-report.md b/.changeset/bright-coats-report.md new file mode 100644 index 000000000..8a46b3f4e --- /dev/null +++ b/.changeset/bright-coats-report.md @@ -0,0 +1,5 @@ +--- +"@hera/plugin-rental": patch +--- + +fix get-stream diff --git a/packages/plugins/@hera/plugin-rental/src/server/actions/records-controller.ts b/packages/plugins/@hera/plugin-rental/src/server/actions/records-controller.ts index 11c211061..4e0a3432c 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/actions/records-controller.ts +++ b/packages/plugins/@hera/plugin-rental/src/server/actions/records-controller.ts @@ -8,7 +8,7 @@ import _ from 'lodash'; import { FilterParser, Repository } from '@nocobase/database'; import { CollectionRepository } from '@nocobase/plugin-collection-manager'; import { Cache } from '@nocobase/cache'; -import { getStreamAsBuffer } from 'get-stream'; +import getStream from 'get-stream'; import { stringify } from 'flatted'; @Controller('records') @@ -237,7 +237,8 @@ export class RecordPreviewController { ctx.body = Buffer.from(result.data); } } else { - const buf = await getStreamAsBuffer( + const buf = await getStream.buffer( + // @ts-ignore await this.recordPdfService.transformPdfV2(record, leaseData, feeData, { isDouble: double, printSetup }), ); ctx.body = buf;