fix: login failure on U16 #1991

Merged
Sainan merged 2 commits from u16 into main 2025-05-06 02:29:03 -07:00
2 changed files with 6 additions and 6 deletions
Showing only changes of commit 80de0706bf - Show all commits

View File

@ -41,7 +41,7 @@ export const loginController: RequestHandler = async (request, response) => {
email: loginRequest.email,
password: loginRequest.password,
DisplayName: name,
CountryCode: loginRequest.lang.toUpperCase(),
CountryCode: loginRequest.lang?.toUpperCase() ?? "EN",
ClientType: loginRequest.ClientType == "webui-register" ? "webui" : loginRequest.ClientType,
CrossPlatformAllowed: true,
ForceLogoutVersion: 0,
@ -91,7 +91,7 @@ export const loginController: RequestHandler = async (request, response) => {
account.ClientType = loginRequest.ClientType;
account.Nonce = nonce;
account.CountryCode = loginRequest.lang.toUpperCase();
account.CountryCode = loginRequest.lang?.toUpperCase() ?? "EN";
account.BuildLabel = buildLabel;
}
await account.save();

View File

@ -35,11 +35,11 @@ export interface ILoginRequest {
email: string;
password: string;
time: number;
s: string;
lang: string;
s?: string;
lang?: string;
date: number;
ClientType: string;
PS: string;
ClientType?: string;
PS?: string;
kick?: boolean;
}