From 5077bd6a0ba0aad8e32f50483c59f4f10819d7bf Mon Sep 17 00:00:00 2001 From: sam Date: Thu, 26 Dec 2024 14:01:51 -0500 Subject: [PATCH] fix(backend): return report context in mod api --- Foxnouns.Backend/Dto/Moderation.cs | 1 + Foxnouns.Backend/Services/ModerationRendererService.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/Foxnouns.Backend/Dto/Moderation.cs b/Foxnouns.Backend/Dto/Moderation.cs index f9e6ab7..c9489ed 100644 --- a/Foxnouns.Backend/Dto/Moderation.cs +++ b/Foxnouns.Backend/Dto/Moderation.cs @@ -29,6 +29,7 @@ public record ReportResponse( PartialMember? TargetMember, ReportStatus Status, ReportReason Reason, + string? Context, ReportTargetType TargetType, JObject? Snapshot ); diff --git a/Foxnouns.Backend/Services/ModerationRendererService.cs b/Foxnouns.Backend/Services/ModerationRendererService.cs index deed9c5..04ef46b 100644 --- a/Foxnouns.Backend/Services/ModerationRendererService.cs +++ b/Foxnouns.Backend/Services/ModerationRendererService.cs @@ -36,6 +36,7 @@ public class ModerationRendererService( : null, report.Status, report.Reason, + report.Context, report.TargetType, report.TargetSnapshot != null ? JsonConvert.DeserializeObject(report.TargetSnapshot)