Fix StatisticsHelper concurrent exception

This commit is contained in:
Slendy 2022-09-05 05:04:06 -05:00
parent cf5369d372
commit eb7cda8997
No known key found for this signature in database
GPG key ID: 7288D68361B91428
9 changed files with 65 additions and 44 deletions

View file

@ -21,15 +21,15 @@ public class ModPanelPage : BaseLayout
this.Statistics.Add(new AdminPanelStatistic(
statisticNamePlural: "Reports",
count: await StatisticsHelper.ReportCount(),
count: await StatisticsHelper.ReportCount(this.Database),
viewAllEndpoint: "/moderation/reports/0")
);
this.Statistics.Add(new AdminPanelStatistic(
statisticNamePlural: "Cases",
count: await StatisticsHelper.DismissedCaseCount(),
count: await StatisticsHelper.DismissedCaseCount(this.Database),
viewAllEndpoint: "/moderation/cases/0",
secondStatistic: await StatisticsHelper.CaseCount())
secondStatistic: await StatisticsHelper.CaseCount(this.Database))
);
return this.Page();