返回提交历史
Modified
src/services/webService.ts
+10
-0
XFEstudio/SpaceNinjaServer
chore(webui): unset nonce when logging out (#2242)
Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2242 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
3bcd5827
代码差异
1 个文件
+10
-0
@@ -176,7 +176,17 @@ const wsOnConnect = (ws: ws, _req: http.IncomingMessage): void => {
176
176
}
177
177
}
178
178
if (data.logout) {
179
const accountId = (ws as IWsCustomData).accountId;
179
180
(ws as IWsCustomData).accountId = undefined;
181
await Account.updateOne(
182
{
183
_id: accountId,
184
ClientType: "webui"
185
},
186
{
187
Nonce: 0
188
}
189
);
180
190
}
181
191
});
182
192
};