chore(webui): unset nonce when logging out #2242

Merged
Sainan merged 1 commits from unset-nonce into main 2025-06-21 14:38:49 -07:00
Showing only changes of commit e60de0a666 - Show all commits

View File

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