1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-12 16:18:07 -05:00

update schema to support unique guid + game combinations

This commit is contained in:
RaidMax
2022-06-15 19:37:34 -05:00
parent 32c4ac5bf3
commit 16d295024e
46 changed files with 5449 additions and 181 deletions

View File

@ -54,7 +54,8 @@ public class BanInfoResourceQueryHelper : IResourceQueryHelper<BanInfoRequest, B
client.NetworkId,
client.AliasLinkId,
client.ClientId,
client.CurrentAlias.IPAddress
client.CurrentAlias.IPAddress,
client.GameName
}).ToListAsync();
var results = new List<BanInfo>();
@ -101,7 +102,6 @@ public class BanInfoResourceQueryHelper : IResourceQueryHelper<BanInfoRequest, B
.Select(alias => alias.LinkId)
.ToListAsync()).Distinct();
matchedPenalties = await context.Penalties.Where(penalty => penalty.Type == EFPenalty.PenaltyType.Ban)
.Where(penalty => penalty.Expires == null || penalty.Expires > lateDateTime)
.Where(penalty => penalty.LinkId != null && linkIds.Contains(penalty.LinkId.Value))
@ -158,6 +158,7 @@ public class BanInfoResourceQueryHelper : IResourceQueryHelper<BanInfoRequest, B
ClientId = matchingClient.ClientId,
NetworkId = matchingClient.NetworkId,
IPAddress = matchingClient.IPAddress,
Game = matchingClient.GameName,
AssociatedPenalties = relatedEntities,
AttachedPenalty = allPenalties.FirstOrDefault(penalty =>