Skip to content

Commit

Permalink
version 1.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbah committed Oct 20, 2020
1 parent 7c06245 commit 5daa3ba
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 10 deletions.
6 changes: 3 additions & 3 deletions CentCom.API/CentCom.API.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Version>1.2.3</Version>
<AssemblyVersion>1.2.3.0</AssemblyVersion>
<FileVersion>1.2.3.0</FileVersion>
<Version>1.2.4</Version>
<AssemblyVersion>1.2.4.0</AssemblyVersion>
<FileVersion>1.2.4.0</FileVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand Down
6 changes: 3 additions & 3 deletions CentCom.Common/CentCom.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>1.2.3</Version>
<AssemblyVersion>1.2.3.0</AssemblyVersion>
<FileVersion>1.2.3.0</FileVersion>
<Version>1.2.4</Version>
<AssemblyVersion>1.2.4.0</AssemblyVersion>
<FileVersion>1.2.4.0</FileVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions CentCom.Server/CentCom.Server.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AssemblyVersion>1.2.3.0</AssemblyVersion>
<FileVersion>1.2.3.0</FileVersion>
<Version>1.2.3</Version>
<AssemblyVersion>1.2.4.0</AssemblyVersion>
<FileVersion>1.2.4.0</FileVersion>
<Version>1.2.4</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
11 changes: 10 additions & 1 deletion CentCom.Server/Services/FulpBanService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,22 @@ public async Task<IEnumerable<Ban>> GetBansAsync(int page = 1)
var content = JsonSerializer.Deserialize<Dictionary<string, JsonElement>>(response.Content);
foreach (var ban in content["value"].GetProperty("bans").EnumerateArray())
{
// Need to get both the expiration as well as the unbanned time as they can differ
DateTime? expiration = expiration = ban.GetProperty("unbannedTime").GetString() == null ? (DateTime?)null
: DateTime.Parse(ban.GetProperty("unbannedTime").GetString()); ;
if (!expiration.HasValue)
{
expiration = ban.GetProperty("banExpireTime").GetString() == null ? (DateTime?)null
: DateTime.Parse(ban.GetProperty("banExpireTime").GetString());
}

// Get ban
var toAdd = new Ban()
{
BannedOn = DateTime.Parse(ban.GetProperty("banApplyTime").GetString()),
BannedBy = ban.GetProperty("adminCkey").GetString(),
BanType = ban.GetProperty("role")[0].GetString().ToLower() == "server" ? BanType.Server : BanType.Job,
Expires = ban.GetProperty("banExpireTime").GetString() == null ? (DateTime?)null : DateTime.Parse(ban.GetProperty("banExpireTime").GetString()),
Expires = expiration,
CKey = ban.GetProperty("bannedCkey").GetString(),
Reason = ban.GetProperty("reason").GetString(),
SourceNavigation = _banSource
Expand Down

0 comments on commit 5daa3ba

Please sign in to comment.