this really bads my gateway
Some checks are pending
/ test-build-and-push (push) Waiting to run

This commit is contained in:
notfire 2025-03-30 22:39:03 -04:00
parent d8a4d15beb
commit f486266bb7
Signed by: notfire
GPG key ID: 3AFDACAAB4E56B16

View file

@ -88,6 +88,7 @@ public class AdminController(
[HttpPatch("/api/v1/pleroma/admin/reports")] [HttpPatch("/api/v1/pleroma/admin/reports")]
[Authenticate("admin:read:reports")] [Authenticate("admin:read:reports")]
[ProducesResults(HttpStatusCode.OK)] [ProducesResults(HttpStatusCode.OK)]
[ProducesErrors(HttpStatusCode.NotFound)]
public async void SetReportState(ReportsQuery query) public async void SetReportState(ReportsQuery query)
{ {
try try
@ -96,8 +97,8 @@ public class AdminController(
{ {
var report = await db.Reports.Where(p => p.Id == list.Id).FirstOrDefaultAsync() var report = await db.Reports.Where(p => p.Id == list.Id).FirstOrDefaultAsync()
?? throw GracefulException.NotFound("Report not found"); ?? throw GracefulException.NotFound("Report not found");
report.Resolved = list.State == "closed"; report.Resolved = list.State is "resolved" or "closed";
await db.SaveChangesAsync(); await db.SaveChangesAsync();
} }