chore(webui): unset nonce when logging out (#2242)
All checks were successful
Build / build (push) Successful in 49s
Build Docker image / docker-arm64 (push) Successful in 1m1s
Build Docker image / docker-amd64 (push) Successful in 1m17s

Reviewed-on: #2242
Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com>
Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit is contained in:
Sainan 2025-06-21 14:38:48 -07:00 committed by Sainan
parent d16d763977
commit 3bcd5827f9

View File

@ -176,7 +176,17 @@ const wsOnConnect = (ws: ws, _req: http.IncomingMessage): void => {
} }
} }
if (data.logout) { if (data.logout) {
const accountId = (ws as IWsCustomData).accountId;
(ws as IWsCustomData).accountId = undefined; (ws as IWsCustomData).accountId = undefined;
await Account.updateOne(
{
_id: accountId,
ClientType: "webui"
},
{
Nonce: 0
}
);
} }
}); });
}; };