Feat: forcibly delete files in dashboard (#277)

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

@ -18,7 +18,8 @@ type FileService struct {
// FileBatchService 文件批量操作服务
type FileBatchService struct {
ID []uint `json:"id" binding:"min=1"`
ID []uint `json:"id" binding:"min=1"`
Force bool `json:"force"`
}
// 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()
}
}(userFile)

Loading…
Cancel
Save