update schema to support unique guid + game combinations
This commit is contained in:
@ -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 =>
|
||||
|
@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Data.Models;
|
||||
|
||||
namespace WebfrontCore.QueryHelpers.Models;
|
||||
|
||||
@ -9,6 +10,7 @@ public class BanInfo
|
||||
public int ClientId { get; set; }
|
||||
public int? IPAddress { get; set; }
|
||||
public long NetworkId { get; set; }
|
||||
public Reference.Game Game { get; set; }
|
||||
public PenaltyInfo AttachedPenalty { get; set; }
|
||||
public IEnumerable<PenaltyInfo> AssociatedPenalties { get; set; }
|
||||
}
|
||||
|
Reference in New Issue
Block a user