🐛 Try to fix the soft delete filter didn't work in drive

This commit is contained in:
2025-11-17 23:19:03 +08:00
parent a172128d84
commit 4280168002
5 changed files with 38 additions and 24 deletions

View File

@@ -157,7 +157,8 @@ public class FileIndexController(
var query = db.Files
.Where(f => f.AccountId == accountId
&& f.IsMarkedRecycle == recycled
&& !db.FileIndexes.Any(fi => fi.FileId == f.Id && fi.AccountId == accountId))
&& !db.FileIndexes.Any(fi => fi.FileId == f.Id && fi.AccountId == accountId)
)
.OrderByDescending(f => f.CreatedAt)
.AsQueryable();
@@ -509,4 +510,4 @@ public class CreateFileIndexRequest
{
[MaxLength(32)] public string FileId { get; set; } = null!;
public string Path { get; set; } = null!;
}
}