fix startup issue with no config
This commit is contained in:
parent
f4ded4cc1f
commit
c550d424dd
@ -388,6 +388,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)
|
||||||
|
Loading…
Reference in New Issue
Block a user