From e72f939319f7324264ee9825816b9c62c2b63b4d Mon Sep 17 00:00:00 2001 From: Timothy Schenk Date: Sat, 25 Nov 2023 12:26:28 +0100 Subject: [PATCH] revert: accidental delete --- Server/Program.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Server/Program.cs b/Server/Program.cs index 8c72a28..212fc75 100644 --- a/Server/Program.cs +++ b/Server/Program.cs @@ -2,6 +2,7 @@ using System.Net; using System.Reflection; +using System.Text.Json; using MassTransit; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; @@ -16,6 +17,7 @@ using OpenTelemetry.Resources; using OpenTelemetry.Trace; using Server.DB; using Server.Services; +using Wonderking.Game.Mapping; var builder = Host.CreateApplicationBuilder(); #if DEBUG @@ -94,6 +96,10 @@ builder.Services.AddDbContextPool(o => .EnableSensitiveDataLogging().UseLazyLoadingProxies().UseLoggerFactory(loggerFactory); }); +builder.Services.AddSingleton( + JsonSerializer.Deserialize( + File.ReadAllText("config/character-stats.mapping.json")) ?? throw new InvalidOperationException()); + builder.Services.AddSingleton(loggerFactory); builder.Services.AddSingleton(); builder.Services.AddSingleton();