This commit is contained in:
parent
f486266bb7
commit
d497e06643
1 changed files with 10 additions and 15 deletions
|
@ -89,9 +89,8 @@ public class AdminController(
|
|||
[Authenticate("admin:read:reports")]
|
||||
[ProducesResults(HttpStatusCode.OK)]
|
||||
[ProducesErrors(HttpStatusCode.NotFound)]
|
||||
public async void SetReportState(ReportsQuery query)
|
||||
{
|
||||
try
|
||||
// ReSharper disable once AsyncVoidMethod
|
||||
public async Task<ReportsQuery>? SetReportState(ReportsQuery query)
|
||||
{
|
||||
foreach (var list in query.Reports)
|
||||
{
|
||||
|
@ -102,11 +101,7 @@ public class AdminController(
|
|||
|
||||
await db.SaveChangesAsync();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
// ReSharper disable once AsyncVoidMethod
|
||||
throw GracefulException.Conflict(e.ToString());
|
||||
}
|
||||
|
||||
return query;
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue