From b7446eceebfc34325ea881f2318506b58bf4b7af Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Tue, 11 Mar 2025 20:42:30 +0100 Subject: [PATCH] [backend/api] Set report assignee when marking report as resolved (ISH-116) --- Iceshrimp.Backend/Controllers/Web/ModerationController.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Iceshrimp.Backend/Controllers/Web/ModerationController.cs b/Iceshrimp.Backend/Controllers/Web/ModerationController.cs index 1660406a..fdb3bbe8 100644 --- a/Iceshrimp.Backend/Controllers/Web/ModerationController.cs +++ b/Iceshrimp.Backend/Controllers/Web/ModerationController.cs @@ -108,9 +108,11 @@ public class ModerationController( [ProducesErrors(HttpStatusCode.NotFound)] public async Task ResolveReport(string id) { + var user = HttpContext.GetUserOrFail(); var report = await db.Reports.FirstOrDefaultAsync(p => p.Id == id) ?? throw GracefulException.NotFound("Report not found"); + report.Assignee = user; report.Resolved = true; await db.SaveChangesAsync(); }