Feat: forcibly delete files in dashboard (#277)
This commit is contained in:
parent
8b68d46bdf
commit
7b571499a7
1 changed files with 3 additions and 2 deletions
|
@ -18,7 +18,8 @@ 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…
Add table
Reference in a new issue