From ab8382dffed7dc884a4a35d28a3779f0a4484d70 Mon Sep 17 00:00:00 2001 From: Ske Date: Thu, 16 Apr 2020 22:03:23 +0200 Subject: [PATCH] Load proper config file for non-Docker API --- PluralKit.API/Startup.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PluralKit.API/Startup.cs b/PluralKit.API/Startup.cs index 503d4487..a55dfcf2 100644 --- a/PluralKit.API/Startup.cs +++ b/PluralKit.API/Startup.cs @@ -1,4 +1,6 @@ -using Autofac; +using System; + +using Autofac; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; @@ -31,7 +33,7 @@ namespace PluralKit.API public void ConfigureContainer(ContainerBuilder builder) { - builder.RegisterInstance(Configuration); + builder.RegisterInstance(InitUtils.BuildConfiguration(Environment.GetCommandLineArgs()).Build()).As(); builder.RegisterModule(new ConfigModule()); builder.RegisterModule(new LoggingModule("api")); builder.RegisterModule(new MetricsModule("API"));