XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

SpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 1 Star 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
Sainan <63328889+Sainan@users.noreply.github.com>
提交于

代码差异

1 个文件 +10 -0
Modified src/services/webService.ts +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 };