From e4a3b1316046eb0e5547cc07a0617a932b54a8e9 Mon Sep 17 00:00:00 2001 From: Sainan Date: Fri, 7 Mar 2025 00:41:36 -0800 Subject: [PATCH] chore: simplify config (#1090) Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/1090 --- config.json.example | 4 +--- src/controllers/api/loginController.ts | 4 ++-- src/services/configService.ts | 2 -- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/config.json.example b/config.json.example index db0f6d419..e710f5035 100644 --- a/config.json.example +++ b/config.json.example @@ -5,11 +5,9 @@ "level": "trace" }, "myAddress": "localhost", - "hubAddress": "https://localhost/api/", - "platformCDNs": ["https://localhost/"], - "NRS": ["localhost"], "httpPort": 80, "httpsPort": 443, + "NRS": ["localhost"], "administratorNames": [], "autoCreateAccount": true, "skipTutorial": true, diff --git a/src/controllers/api/loginController.ts b/src/controllers/api/loginController.ts index d57fd7e10..5293641fe 100644 --- a/src/controllers/api/loginController.ts +++ b/src/controllers/api/loginController.ts @@ -85,8 +85,8 @@ const createLoginResponse = (account: IDatabaseAccountJson, buildLabel: string): Nonce: account.Nonce, Groups: [], IRC: config.myIrcAddresses ?? [config.myAddress], - platformCDNs: config.platformCDNs, - HUB: config.hubAddress, + platformCDNs: [`https://${config.myAddress}/`], + HUB: `https://${config.myAddress}/api/`, NRS: config.NRS, DTLS: 99, BuildLabel: buildLabel, diff --git a/src/services/configService.ts b/src/services/configService.ts index e1c795342..c17066c08 100644 --- a/src/services/configService.ts +++ b/src/services/configService.ts @@ -33,8 +33,6 @@ interface IConfig { httpPort?: number; httpsPort?: number; myIrcAddresses?: string[]; - platformCDNs?: string[]; - hubAddress?: string; NRS?: string[]; administratorNames?: string[] | string; autoCreateAccount?: boolean;