1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-08 06:08:20 -05:00

fix startup issue with no config

This commit is contained in:
RaidMax 2023-04-09 09:59:10 -05:00
parent b1f3155131
commit 892d2c8fc5

View File

@ -389,6 +389,13 @@ namespace IW4MAdmin.Application
var masterRestClient = RestClient.For<IMasterApi>(httpClient); var masterRestClient = RestClient.For<IMasterApi>(httpClient);
var translationLookup = Configure.Initialize(Utilities.DefaultLogger, masterRestClient, appConfig); var translationLookup = Configure.Initialize(Utilities.DefaultLogger, masterRestClient, appConfig);
if (appConfig == null)
{
appConfig = (ApplicationConfiguration) new ApplicationConfiguration().Generate();
appConfigHandler.Set(appConfig);
appConfigHandler.Save().GetAwaiter().GetResult();
}
// register override level names // register override level names
foreach (var (key, value) in appConfig.OverridePermissionLevelNames) foreach (var (key, value) in appConfig.OverridePermissionLevelNames)
{ {