mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Feat: forcibly delete files in dashboard (#277)
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user