fix: use hard delete
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 40s
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 40s
This commit is contained in:
parent
8d08b0ed9c
commit
7eb7427817
@ -34,7 +34,7 @@ export class AdminFilesController {
|
|||||||
@AdminRoles('SUPER_ADMIN' as AdminRole)
|
@AdminRoles('SUPER_ADMIN' as AdminRole)
|
||||||
@ApiOperation({ summary: '软删除文件' })
|
@ApiOperation({ summary: '软删除文件' })
|
||||||
async remove(@Param('id') id: string) {
|
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 };
|
return { success: true };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user