Feat: add option to force delete file record in database

This commit is contained in:
HFO4
2020-04-19 10:09:16 +08:00
parent 9910f8d732
commit ab3b59e63d
6 changed files with 68 additions and 10 deletions

View File

@@ -65,7 +65,7 @@ func (service *UserBatchService) Delete() serializer.Response {
if err != nil {
return serializer.Err(serializer.CodeNotFound, "无法找到用户根目录", err)
}
fs.Delete(context.Background(), []uint{root.ID}, []uint{})
fs.Delete(context.Background(), []uint{root.ID}, []uint{}, false)
// 删除相关任务
model.DB.Where("user_id = ?", uid).Delete(&model.Download{})