update delete many file
This commit is contained in:
@@ -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({
|
await this.prisma.uploadedFile.deleteMany({
|
||||||
where: {
|
where: {
|
||||||
id: {
|
id: {
|
||||||
@@ -249,7 +244,7 @@ export class UploadedFileSchema extends PothosSchema {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
files.map((file, index) =>
|
files.map((file) =>
|
||||||
this.minioService.deleteFile(file.fileName, 'files'),
|
this.minioService.deleteFile(file.fileName, 'files'),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user