update delete many file

This commit is contained in:
2024-10-17 00:57:33 +07:00
parent 8b56334ac9
commit 053fb38273

View File

@@ -236,11 +236,6 @@ export class UploadedFileSchema extends PothosSchema {
},
},
});
const fileUrls = await Promise.all(
files.map((file) =>
this.minioService.getFileUrl(file.fileName, 'files'),
),
);
await this.prisma.uploadedFile.deleteMany({
where: {
id: {
@@ -249,7 +244,7 @@ export class UploadedFileSchema extends PothosSchema {
},
});
await Promise.all(
files.map((file, index) =>
files.map((file) =>
this.minioService.deleteFile(file.fileName, 'files'),
),
);