Skip to content

Commit

Permalink
review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
volllly committed Oct 17, 2023
1 parent e7a780c commit 07de926
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace fiskaltrust.Launcher.Helpers
{
sealed class DateTimeConverter : JsonConverter<DateTime>
sealed class CustomDateTimeConverter : JsonConverter<DateTime>
{
private readonly static JsonConverter<DateTime> DEFAULT_CONVERTER = (JsonConverter<DateTime>)JsonSerializerOptions.Default.GetConverter(typeof(DateTime));
static readonly DateTime EPOCH = new DateTime(1970, 1, 1, 0, 0, 0);
Expand Down
2 changes: 1 addition & 1 deletion src/fiskaltrust.Launcher/Services/HostingService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ private WebApplication CreateRestHost<T>(WebApplicationBuilder builder, Uri uri,
{
options.SerializerOptions.NumberHandling = System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString;
options.SerializerOptions.Converters.Add(new NumberToStringConverter());
options.SerializerOptions.Converters.Add(new DateTimeConverter());
options.SerializerOptions.Converters.Add(new CustomDateTimeConverter());
options.SerializerOptions.PropertyNamingPolicy = null;
options.SerializerOptions.DefaultIgnoreCondition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull;
});
Expand Down

0 comments on commit 07de926

Please sign in to comment.