combined Penalty and EFPenalty

moved some classes around
This commit is contained in:
RaidMax
2019-05-29 16:55:35 -05:00
parent 0b0290a871
commit 95d64df321
54 changed files with 231 additions and 207 deletions

View File

@ -1,5 +1,5 @@
using Microsoft.AspNetCore.Mvc;
using SharedLibraryCore.Objects;
using SharedLibraryCore.Database.Models;
using System.Linq;
using System.Threading.Tasks;
@ -9,7 +9,7 @@ namespace WebfrontCore.ViewComponents
{
private const int PENALTY_COUNT = 15;
public async Task<IViewComponentResult> InvokeAsync(int offset, Penalty.PenaltyType showOnly)
public async Task<IViewComponentResult> InvokeAsync(int offset, EFPenalty.PenaltyType showOnly)
{
var penalties = await Program.Manager.GetPenaltyService().GetRecentPenalties(PENALTY_COUNT, offset, showOnly);
penalties = User.Identity.IsAuthenticated ? penalties : penalties.Where(p => !p.Sensitive).ToList();