diff --git a/src/modules/files/admin-files.controller.ts b/src/modules/files/admin-files.controller.ts index 424ea61..9fe21e3 100644 --- a/src/modules/files/admin-files.controller.ts +++ b/src/modules/files/admin-files.controller.ts @@ -34,7 +34,7 @@ export class AdminFilesController { @AdminRoles('SUPER_ADMIN' as AdminRole) @ApiOperation({ summary: '软删除文件' }) async remove(@Param('id') id: string) { - await this.prisma.uploadedFile.update({ where: { id }, data: { deletedAt: new Date() } }); + await this.prisma.uploadedFile.delete({ where: { id } }); return { success: true }; } }