chore: cleanup config #979

Merged
OrdisPrime merged 2 commits from cleanupconfig into main 2025-02-20 06:16:41 -08:00
4 changed files with 11 additions and 33 deletions

View File

@ -5,6 +5,9 @@
"level": "trace" "level": "trace"
}, },
"myAddress": "localhost", "myAddress": "localhost",
"hubAddress": "https://localhost/api/",
"platformCDNs": ["https://localhost/"],
"NRS": ["localhost"],
"httpPort": 80, "httpPort": 80,
"httpsPort": 443, "httpsPort": 443,
"administratorNames": [], "administratorNames": [],

View File

@ -6,7 +6,6 @@ import { buildConfig } from "@/src/services/buildConfigService";
import { Account } from "@/src/models/loginModel"; import { Account } from "@/src/models/loginModel";
import { createAccount, isCorrectPassword, isNameTaken } from "@/src/services/loginService"; import { createAccount, isCorrectPassword, isNameTaken } from "@/src/services/loginService";
import { IDatabaseAccountJson, ILoginRequest, ILoginResponse } from "@/src/types/loginTypes"; import { IDatabaseAccountJson, ILoginRequest, ILoginResponse } from "@/src/types/loginTypes";
import { DTLS, groups, HUB, platformCDNs } from "@/static/fixed_responses/login_static";
import { logger } from "@/src/utils/logger"; import { logger } from "@/src/utils/logger";
export const loginController: RequestHandler = async (request, response) => { export const loginController: RequestHandler = async (request, response) => {
@ -84,12 +83,12 @@ const createLoginResponse = (account: IDatabaseAccountJson, buildLabel: string):
ConsentNeeded: account.ConsentNeeded, ConsentNeeded: account.ConsentNeeded,
TrackedSettings: account.TrackedSettings, TrackedSettings: account.TrackedSettings,
Nonce: account.Nonce, Nonce: account.Nonce,
Groups: groups, Groups: [],
platformCDNs: platformCDNs,
NRS: [config.myAddress],
DTLS: DTLS,
IRC: config.myIrcAddresses ?? [config.myAddress], IRC: config.myIrcAddresses ?? [config.myAddress],
HUB: HUB, platformCDNs: config.platformCDNs,
HUB: config.hubAddress,
NRS: config.NRS,
DTLS: 99,
BuildLabel: buildLabel, BuildLabel: buildLabel,
MatchmakingBuildId: buildConfig.matchmakingBuildId MatchmakingBuildId: buildConfig.matchmakingBuildId
}; };

View File

@ -33,6 +33,9 @@ interface IConfig {
httpPort?: number; httpPort?: number;
httpsPort?: number; httpsPort?: number;
myIrcAddresses?: string[]; myIrcAddresses?: string[];
platformCDNs: string[];
hubAddress: string;
NRS: string[];
administratorNames?: string[] | string; administratorNames?: string[] | string;
autoCreateAccount?: boolean; autoCreateAccount?: boolean;
skipTutorial?: boolean; skipTutorial?: boolean;

View File

@ -1,27 +0,0 @@
import { IGroup } from "@/src/types/loginTypes";
export const groups: IGroup[] = [
{
experiment: "InitiatePage",
experimentGroup: "initiate_page_no_video"
},
{ experiment: "ChatQAChannel", experimentGroup: "control" },
{
experiment: "MarketSearchRecommendations",
experimentGroup: "premium_credit_purchases_14_days"
},
{ experiment: "SurveyLocation", experimentGroup: "EXIT" },
{ experiment: "GamesightAB", experimentGroup: "a" }
];
export const platformCDNs = [
"https://content.warframe.com/",
"https://content-xb1.warframe.com/",
"https://content-ps4.warframe.com/",
"https://content-swi.warframe.com/",
"https://content-mob.warframe.com/"
];
export const DTLS = 99;
export const HUB = "https://arbiter.warframe.com/api/";