This commit is contained in:
parent
d8a4d15beb
commit
f486266bb7
1 changed files with 3 additions and 2 deletions
|
@ -88,6 +88,7 @@ public class AdminController(
|
|||
[HttpPatch("/api/v1/pleroma/admin/reports")]
|
||||
[Authenticate("admin:read:reports")]
|
||||
[ProducesResults(HttpStatusCode.OK)]
|
||||
[ProducesErrors(HttpStatusCode.NotFound)]
|
||||
public async void SetReportState(ReportsQuery query)
|
||||
{
|
||||
try
|
||||
|
@ -96,8 +97,8 @@ public class AdminController(
|
|||
{
|
||||
var report = await db.Reports.Where(p => p.Id == list.Id).FirstOrDefaultAsync()
|
||||
?? throw GracefulException.NotFound("Report not found");
|
||||
|
||||
report.Resolved = list.State == "closed";
|
||||
|
||||
report.Resolved = list.State is "resolved" or "closed";
|
||||
|
||||
await db.SaveChangesAsync();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue