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

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
}
);
} }
}); });
}; };