diff --git a/CentCom.API/CentCom.API.csproj b/CentCom.API/CentCom.API.csproj index 9346d21..dd2db13 100644 --- a/CentCom.API/CentCom.API.csproj +++ b/CentCom.API/CentCom.API.csproj @@ -7,8 +7,6 @@ - - diff --git a/CentCom.API/CentCom.API.xml b/CentCom.API/CentCom.API.xml index 23dbc4f..74d3408 100644 --- a/CentCom.API/CentCom.API.xml +++ b/CentCom.API/CentCom.API.xml @@ -44,6 +44,7 @@ The version of the application in semver The commit hash of the build that the application is running + The copyright notice for this version of the application @@ -51,6 +52,7 @@ The version of the application in semver The commit hash of the build that the application is running + The copyright notice for this version of the application The version of the application in semver @@ -58,6 +60,9 @@ The commit hash of the build that the application is running + + The copyright notice for this version of the application + DTO for ban sources diff --git a/CentCom.API/Models/AppVersionDTO.cs b/CentCom.API/Models/AppVersionDTO.cs index b8e8b43..7135fff 100644 --- a/CentCom.API/Models/AppVersionDTO.cs +++ b/CentCom.API/Models/AppVersionDTO.cs @@ -7,6 +7,7 @@ namespace CentCom.API.Models; /// /// The version of the application in semver /// The commit hash of the build that the application is running +/// The copyright notice for this version of the application public record AppVersionDTO(string Version, string Commit, string CopyrightNotice) { internal AppVersionDTO(AssemblyInformation assemblyInfo) : this(assemblyInfo.Version, assemblyInfo.Commit, diff --git a/CentCom.Common/CentCom.Common.csproj b/CentCom.Common/CentCom.Common.csproj index 9307a2d..d5c8f3f 100644 --- a/CentCom.Common/CentCom.Common.csproj +++ b/CentCom.Common/CentCom.Common.csproj @@ -12,7 +12,6 @@ - diff --git a/CentCom.Common/Models/Rest/RestBan.cs b/CentCom.Common/Models/Rest/RestBan.cs index ca8034c..77603ef 100644 --- a/CentCom.Common/Models/Rest/RestBan.cs +++ b/CentCom.Common/Models/Rest/RestBan.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Text.Json.Serialization; using CentCom.Common.Abstract; namespace CentCom.Common.Models.Rest; @@ -15,5 +16,6 @@ public record RestBan DateTimeOffset? Expires, ICKey UnbannedBy, IReadOnlyList JobBans, + [property: JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] int? RoundId ) : IRestBan; \ No newline at end of file diff --git a/CentCom.Server/Services/StandardProviderService.cs b/CentCom.Server/Services/StandardProviderService.cs index d57dfde..65d6514 100644 --- a/CentCom.Server/Services/StandardProviderService.cs +++ b/CentCom.Server/Services/StandardProviderService.cs @@ -5,13 +5,11 @@ using System.Text.Json; using System.Text.Json.Serialization; using System.Threading.Tasks; -using CentCom.Common.Abstract; using CentCom.Common.Extensions; using CentCom.Common.Models; using CentCom.Common.Models.Rest; using CentCom.Server.Configuration; using Microsoft.Extensions.Logging; -using Remora.Rest.Extensions; using RestSharp; using RestSharp.Serializers.Json; @@ -34,7 +32,7 @@ private async Task> GetBansAsync(int? cursor = null) var request = new RestRequest("api/ban"); if (cursor.HasValue) request.AddQueryParameter("cursor", cursor.ToString()); - var response = await Client.ExecuteAsync>(request); + var response = await Client.ExecuteAsync>(request); if (response.StatusCode != HttpStatusCode.OK) FailedRequest(response); @@ -92,7 +90,6 @@ public void Configure(StandardProviderConfiguration config) // Setup JSON for client var options = new JsonSerializerOptions(); options.AddCentComOptions(); - options.AddDataObjectConverter(); options.PropertyNamingPolicy = JsonNamingPolicy.CamelCase; options.Converters.Insert(0, new JsonStringEnumConverter()); diff --git a/CentCom.Test/CentCom.Test.csproj b/CentCom.Test/CentCom.Test.csproj index 92c20db..04b6a1e 100644 --- a/CentCom.Test/CentCom.Test.csproj +++ b/CentCom.Test/CentCom.Test.csproj @@ -23,7 +23,6 @@ -