feat: update CountryCode on subsequent client logins (#270)

Co-authored-by: Sainan <Sainan@users.noreply.github.com>
This commit is contained in:
Sainan 2024-06-06 14:34:27 +02:00 committed by GitHub
parent aae3d10edb
commit 6c64b5070e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -66,8 +66,11 @@ const loginController: RequestHandler = async (request, response) => {
if (account.Nonce == 0 || loginRequest.ClientType != "webui") {
account.Nonce = nonce;
await account.save();
}
if (loginRequest.ClientType != "webui") {
account.CountryCode = loginRequest.lang.toUpperCase();
}
await account.save();
const { email, password, ...databaseAccount } = account.toJSON();
const newLoginResponse: ILoginResponse = {