feat: report page, take action on reports

This commit is contained in:
sam 2025-02-03 17:03:32 +01:00
parent a0ba712632
commit cacd3a30b7
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
14 changed files with 502 additions and 14 deletions

View file

@ -154,6 +154,12 @@ public class ModerationService(
target.DeletedAt = clock.GetCurrentInstant();
target.DeletedBy = moderator.Id;
if (report != null)
{
report.Status = ReportStatus.Closed;
db.Update(report);
}
if (!clearProfile)
{
db.Update(target);
@ -334,6 +340,12 @@ public class ModerationService(
db.Update(targetUser);
}
if (report != null)
{
report.Status = ReportStatus.Closed;
db.Update(report);
}
await db.SaveChangesAsync();
return entry;