From ac2014079f15fe2c5a1d1f09c65aa679f6ad4dd9 Mon Sep 17 00:00:00 2001 From: Ly Tuan Kiet Date: Thu, 5 Dec 2024 17:13:11 +0700 Subject: [PATCH] feat: add listRecords method to MinioService and update start:dev script in package.json - Introduced a new method `listRecords` in MinioService for listing objects in a specified room's records. - Updated the `start:dev` script in package.json to remove debugging options for a cleaner development experience. --- package.json | 2 +- src/Minio/minio.service.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index eec7e1d..e1d0b6f 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "build": "nest build", "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"", "start": "nest start", - "start:dev": "nest start --watch --inspect --debug", + "start:dev": "nest start --watch", "start:debug": "nest start --debug --watch", "start:prod": "node dist/main", "prisma:generate": "npx prisma generate --schema=./epess-database/prisma/schema.prisma", diff --git a/src/Minio/minio.service.ts b/src/Minio/minio.service.ts index 67f0873..77af64f 100644 --- a/src/Minio/minio.service.ts +++ b/src/Minio/minio.service.ts @@ -123,6 +123,10 @@ export class MinioService { }) }) } + + listRecords(roomId: string) { + return this.minioClient.listObjects(this.configService.get('BUCKET_NAME') ?? 'epess', `records/${roomId}`) + } // export document to docx format by get all pages and convert to docx async exportDocument(id: string) { // get all pages