返回提交历史
Modified
src/controllers/api/queueDojoComponentDestructionController.ts
+1
-1
XFEstudio/SpaceNinjaServer
fix: align dojo component DestructionTime to full seconds (#1394)
not doing this causes the client to spam requests and have some UI bugs Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/1394 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
9e99d037
代码差异
1 个文件
+1
-1
@@ -16,7 +16,7 @@ export const queueDojoComponentDestructionController: RequestHandler = async (re
16
16
const componentId = req.query.componentId as string;
17
17
18
18
guild.DojoComponents.id(componentId)!.DestructionTime = new Date(
19
Date.now() + (config.fastDojoRoomDestruction ? 5_000 : 2 * 3600_000)
19
(Math.trunc(Date.now() / 1000) + (config.fastDojoRoomDestruction ? 5 : 2 * 3600)) * 1000
20
20
);
21
21
22
22
await guild.save();