feat: return reports in audit log entries

This commit is contained in:
sam 2024-12-27 13:21:02 -05:00
parent 53006ea313
commit dc9c11ec52
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
5 changed files with 61 additions and 5 deletions

View file

@ -43,7 +43,9 @@ public class AuditLogController(DatabaseContext db, ModerationRendererService mo
_ => limit,
};
IQueryable<AuditLogEntry> query = db.AuditLog.OrderByDescending(e => e.Id);
IQueryable<AuditLogEntry> query = db
.AuditLog.Include(e => e.Report)
.OrderByDescending(e => e.Id);
if (before != null)
query = query.Where(e => e.Id < before.Value);