feat: update CountryCode on subsequent client logins (#270)
Co-authored-by: Sainan <Sainan@users.noreply.github.com>
This commit is contained in:
parent
aae3d10edb
commit
6c64b5070e
@ -66,8 +66,11 @@ const loginController: RequestHandler = async (request, response) => {
|
|||||||
|
|
||||||
if (account.Nonce == 0 || loginRequest.ClientType != "webui") {
|
if (account.Nonce == 0 || loginRequest.ClientType != "webui") {
|
||||||
account.Nonce = nonce;
|
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 { email, password, ...databaseAccount } = account.toJSON();
|
||||||
const newLoginResponse: ILoginResponse = {
|
const newLoginResponse: ILoginResponse = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user