Improved dashboard of drive

This commit is contained in:
2025-07-27 02:14:48 +08:00
parent 7ff9605460
commit 2d728e4b07
4 changed files with 244 additions and 20 deletions

View File

@@ -146,16 +146,17 @@ public class FileController(
.Where(e => e.AccountId == accountId)
.Include(e => e.Pool)
.OrderByDescending(e => e.CreatedAt)
.Skip(offset)
.Take(take);
.AsQueryable();
if (pool.HasValue) query = query.Where(e => e.PoolId == pool);
var files = await query.ToListAsync();
var total = await query.CountAsync();
Response.Headers.Append("X-Total", total.ToString());
var files = await query
.Skip(offset)
.Take(take)
.ToListAsync();
return Ok(files);
}