Feat: forcibly delete files in dashboard (#277)

pull/314/head
HFO4 4 years ago
parent 8b68d46bdf
commit 7b571499a7

@ -19,6 +19,7 @@ type FileService struct {
// FileBatchService 文件批量操作服务 // FileBatchService 文件批量操作服务
type FileBatchService struct { type FileBatchService struct {
ID []uint `json:"id" binding:"min=1"` ID []uint `json:"id" binding:"min=1"`
Force bool `json:"force"`
} }
// Delete 删除文件 // Delete 删除文件
@ -58,7 +59,7 @@ func (service *FileBatchService) Delete(c *gin.Context) serializer.Response {
} }
// 执行删除 // 执行删除
fs.Delete(context.Background(), []uint{}, ids, false) fs.Delete(context.Background(), []uint{}, ids, service.Force)
fs.Recycle() fs.Recycle()
} }
}(userFile) }(userFile)

Loading…
Cancel
Save