forked from OpenWF/SpaceNinjaServer
		
	chore: cleanup config (#979)
Reviewed-on: OpenWF/SpaceNinjaServer#979 Co-authored-by: Ordis <134585663+OrdisPrime@users.noreply.github.com> Co-committed-by: Ordis <134585663+OrdisPrime@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									815d18623e
								
							
						
					
					
						commit
						78548a2ebe
					
				@ -5,6 +5,9 @@
 | 
			
		||||
    "level": "trace"
 | 
			
		||||
  },
 | 
			
		||||
  "myAddress": "localhost",
 | 
			
		||||
  "hubAddress": "https://localhost/api/",
 | 
			
		||||
  "platformCDNs": ["https://localhost/"],
 | 
			
		||||
  "NRS": ["localhost"],
 | 
			
		||||
  "httpPort": 80,
 | 
			
		||||
  "httpsPort": 443,
 | 
			
		||||
  "administratorNames": [],
 | 
			
		||||
 | 
			
		||||
@ -6,7 +6,6 @@ import { buildConfig } from "@/src/services/buildConfigService";
 | 
			
		||||
import { Account } from "@/src/models/loginModel";
 | 
			
		||||
import { createAccount, isCorrectPassword, isNameTaken } from "@/src/services/loginService";
 | 
			
		||||
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";
 | 
			
		||||
 | 
			
		||||
export const loginController: RequestHandler = async (request, response) => {
 | 
			
		||||
@ -84,12 +83,12 @@ const createLoginResponse = (account: IDatabaseAccountJson, buildLabel: string):
 | 
			
		||||
        ConsentNeeded: account.ConsentNeeded,
 | 
			
		||||
        TrackedSettings: account.TrackedSettings,
 | 
			
		||||
        Nonce: account.Nonce,
 | 
			
		||||
        Groups: groups,
 | 
			
		||||
        platformCDNs: platformCDNs,
 | 
			
		||||
        NRS: [config.myAddress],
 | 
			
		||||
        DTLS: DTLS,
 | 
			
		||||
        Groups: [],
 | 
			
		||||
        IRC: config.myIrcAddresses ?? [config.myAddress],
 | 
			
		||||
        HUB: HUB,
 | 
			
		||||
        platformCDNs: config.platformCDNs,
 | 
			
		||||
        HUB: config.hubAddress,
 | 
			
		||||
        NRS: config.NRS,
 | 
			
		||||
        DTLS: 99,
 | 
			
		||||
        BuildLabel: buildLabel,
 | 
			
		||||
        MatchmakingBuildId: buildConfig.matchmakingBuildId
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
@ -33,6 +33,9 @@ interface IConfig {
 | 
			
		||||
    httpPort?: number;
 | 
			
		||||
    httpsPort?: number;
 | 
			
		||||
    myIrcAddresses?: string[];
 | 
			
		||||
    platformCDNs: string[];
 | 
			
		||||
    hubAddress: string;
 | 
			
		||||
    NRS: string[];
 | 
			
		||||
    administratorNames?: string[] | string;
 | 
			
		||||
    autoCreateAccount?: boolean;
 | 
			
		||||
    skipTutorial?: boolean;
 | 
			
		||||
 | 
			
		||||
@ -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/";
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user