mirror of
https://github.com/bitwarden/server.git
synced 2025-05-08 13:12:16 -05:00
Additional cleanup
This commit is contained in:
parent
107e2fc0c3
commit
01093e8bbd
@ -9,15 +9,7 @@ public static class GlobalSettingsFactory
|
|||||||
|
|
||||||
public static GlobalSettings GlobalSettings
|
public static GlobalSettings GlobalSettings
|
||||||
{
|
{
|
||||||
get
|
get { return _globalSettings ??= LoadGlobalSettings(); }
|
||||||
{
|
|
||||||
if (_globalSettings == null)
|
|
||||||
{
|
|
||||||
_globalSettings = LoadGlobalSettings();
|
|
||||||
}
|
|
||||||
|
|
||||||
return _globalSettings;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static GlobalSettings LoadGlobalSettings()
|
private static GlobalSettings LoadGlobalSettings()
|
||||||
@ -34,32 +26,9 @@ public static class GlobalSettingsFactory
|
|||||||
var configuration = configBuilder.Build();
|
var configuration = configBuilder.Build();
|
||||||
var globalSettingsSection = configuration.GetSection("globalSettings");
|
var globalSettingsSection = configuration.GetSection("globalSettings");
|
||||||
|
|
||||||
// Debug: Print all settings from globalSettings section
|
|
||||||
foreach (var setting in globalSettingsSection.GetChildren())
|
|
||||||
{
|
|
||||||
Console.WriteLine($"Found setting: {setting.Key}");
|
|
||||||
foreach (var child in setting.GetChildren())
|
|
||||||
{
|
|
||||||
Console.WriteLine($" - {setting.Key}.{child.Key}");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var settings = new GlobalSettings();
|
var settings = new GlobalSettings();
|
||||||
globalSettingsSection.Bind(settings);
|
globalSettingsSection.Bind(settings);
|
||||||
|
|
||||||
// Output the loaded settings
|
|
||||||
Console.WriteLine($"Loaded DatabaseProvider: {settings.DatabaseProvider}");
|
|
||||||
Console.WriteLine($"PostgreSql settings loaded: {settings.PostgreSql != null}");
|
|
||||||
Console.WriteLine($"SqlServer settings loaded: {settings.SqlServer != null}");
|
|
||||||
Console.WriteLine($"MySql settings loaded: {settings.MySql != null}");
|
|
||||||
Console.WriteLine($"Sqlite settings loaded: {settings.Sqlite != null}");
|
|
||||||
|
|
||||||
// Check for case sensitivity issue with PostgreSql/postgresql keys
|
|
||||||
var postgresqlValue = globalSettingsSection.GetSection("postgresql")?.Value;
|
|
||||||
var postgreSqlValue = globalSettingsSection.GetSection("postgreSql")?.Value;
|
|
||||||
Console.WriteLine($"Raw check - postgresql setting exists: {postgresqlValue != null}");
|
|
||||||
Console.WriteLine($"Raw check - postgreSql setting exists: {postgreSqlValue != null}");
|
|
||||||
|
|
||||||
return settings;
|
return settings;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,9 +9,6 @@ public class Program
|
|||||||
{
|
{
|
||||||
private static int Main(string[] args)
|
private static int Main(string[] args)
|
||||||
{
|
{
|
||||||
// Ensure global settings are loaded
|
|
||||||
var globalSettings = GlobalSettingsFactory.GlobalSettings;
|
|
||||||
|
|
||||||
return new AppRunner<Program>()
|
return new AppRunner<Program>()
|
||||||
.Run(args);
|
.Run(args);
|
||||||
}
|
}
|
||||||
|
@ -26,4 +26,4 @@
|
|||||||
<Compile Remove="..\..\Program.cs" />
|
<Compile Remove="..\..\Program.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user