Refactor backdoor handling and configuration loading
- Changed `TryGet` method return type from `bool?` to `bool` in `BackdoorExtensions.cs` for improved clarity.
- Updated configuration retrieval in `DependencyInjection.cs` to use `GetSection("backdoors")` for targeted loading.
- Added `backdoors.json` configuration file in `Program.cs` to enhance modularity and organization of settings.
This commit is contained in:
@@ -27,6 +27,8 @@ try
|
||||
|
||||
builder.Configuration.AddJsonFile("consumer-repository.json", true, true);
|
||||
|
||||
builder.Configuration.AddJsonFile("backdoors.json", true, true);
|
||||
|
||||
var config = builder.Configuration;
|
||||
|
||||
var apiParams = config.Get<AuthApiParams>() ?? throw new InvalidOperationException("AuthApiOptions is missing or invalid in appsettings.");
|
||||
|
||||
Reference in New Issue
Block a user