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

XFESpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/XFESpaceNinjaServer

fix: save config before sending broadcasts (#3181)

Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/3181 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>

1946efaf
Sainan <63328889+Sainan@users.noreply.github.com>
提交于

代码差异

1 个文件 +1 -1
Modified src/controllers/custom/configController.ts +1 -1
@@ -27,10 +27,10 @@ export const setConfigController: RequestHandler = async (req, res) => {
27 27 const [obj, idx] = configIdToIndexable(id);
28 28 obj[idx] = value;
29 29 }
30 await saveConfig();
30 31 sendWsBroadcastEx({ config_reloaded: true }, undefined, parseInt(String(req.query.wsid)));
31 32 if (isWorldStateUpdate) sendWsBroadcast({ sync_world_state: true });
32 33 syncConfigWithDatabase();
33 await saveConfig();
34 34 res.end();
35 35 } else {
36 36 res.status(401).end();