let's try removing the asyncs
Some checks are pending
/ test-build-and-push (push) Waiting to run

This commit is contained in:
notfire 2025-03-30 22:29:29 -04:00
parent 05ad5a4856
commit 083fd6832e
Signed by: notfire
GPG key ID: 3AFDACAAB4E56B16

View file

@ -88,18 +88,18 @@ public class AdminController(
[HttpPatch("/api/v1/pleroma/admin/reports")]
[Authenticate("admin:read:reports")]
[ProducesResults(HttpStatusCode.OK)]
public async void SetReportState(ReportsQuery query)
public void SetReportState(ReportsQuery query)
{
var user = HttpContext.GetUserOrFail();
foreach (var list in query.Reports)
{
var report = await db.Reports.Where(p => p.Id == list.Id).FirstOrDefaultAsync()
var report = db.Reports.FirstOrDefault(p => p.Id == list.Id)
?? throw GracefulException.NotFound("Report not found");
report.Resolved = list.State == "closed";
await db.SaveChangesAsync();
db.SaveChangesAsync();
}
}
}