refactor(core): Port Public API config (no-changelog) (#10082)

This commit is contained in:
Iván Ovejero
2024-07-17 15:36:40 +02:00
committed by GitHub
parent b0abee7eb6
commit 8a53d6127e
8 changed files with 35 additions and 34 deletions

View File

@@ -81,6 +81,7 @@ export class Server extends AbstractServer {
private readonly loadNodesAndCredentials: LoadNodesAndCredentials,
private readonly orchestrationService: OrchestrationService,
private readonly postHogClient: PostHogClient,
private readonly globalConfig: GlobalConfig,
) {
super('main');
@@ -96,8 +97,7 @@ export class Server extends AbstractServer {
this.presetCredentialsLoaded = false;
const globalConfig = Container.get(GlobalConfig);
this.endpointPresetCredentials = globalConfig.credentials.overwrite.endpoint;
this.endpointPresetCredentials = this.globalConfig.credentials.overwrite.endpoint;
await super.start();
this.logger.debug(`Server ID: ${this.uniqueInstanceId}`);
@@ -185,7 +185,7 @@ export class Server extends AbstractServer {
await this.postHogClient.init();
const publicApiEndpoint = config.getEnv('publicApi.path');
const publicApiEndpoint = this.globalConfig.publicApi.path;
// ----------------------------------------
// Public API