🐛 Fix wrong params name (skip instead of offset)

This commit is contained in:
2025-08-05 21:56:36 +08:00
parent 111701a2c4
commit 795ca04d7c
2 changed files with 6 additions and 6 deletions

View File

@@ -52,24 +52,24 @@ public class SafetyService(AppDatabase db, ILogger<SafetyService> logger)
.CountAsync();
}
public async Task<List<AbuseReport>> GetReports(int skip = 0, int take = 20, bool includeResolved = false)
public async Task<List<AbuseReport>> GetReports(int offset = 0, int take = 20, bool includeResolved = false)
{
return await db.AbuseReports
.Where(r => includeResolved || r.ResolvedAt == null)
.OrderByDescending(r => r.CreatedAt)
.Skip(skip)
.Skip(offset)
.Take(take)
.Include(r => r.Account)
.ToListAsync();
}
public async Task<List<AbuseReport>> GetUserReports(Guid accountId, int skip = 0, int take = 20, bool includeResolved = false)
public async Task<List<AbuseReport>> GetUserReports(Guid accountId, int offset = 0, int take = 20, bool includeResolved = false)
{
return await db.AbuseReports
.Where(r => r.AccountId == accountId)
.Where(r => includeResolved || r.ResolvedAt == null)
.OrderByDescending(r => r.CreatedAt)
.Skip(skip)
.Skip(offset)
.Take(take)
.ToListAsync();
}