Fix the hard delete feature.

This commit is contained in:
lishuang
2021-01-02 17:31:09 +08:00
parent 3752d42de8
commit 13b6d7f98d
2 changed files with 9 additions and 1 deletions

View File

@ -315,7 +315,14 @@ func (this *MatterService) AtomicSoftDelete(request *http.Request, matter *Matte
this.userService.MatterLock(matter.UserUuid)
defer this.userService.MatterUnlock(matter.UserUuid)
this.SoftDelete(request, matter, user)
//if disabled the recycle feature. then we hard delete.
preference := this.preferenceService.Fetch()
if preference.DeletedKeepDays == 0 {
this.Delete(request, matter, user)
} else {
this.SoftDelete(request, matter, user)
}
}
//atomic recovery delete files