[backend/api] Set report assignee when marking report as resolved (ISH-116)
This commit is contained in:
parent
f3999f80be
commit
b7446eceeb
1 changed files with 2 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue