Fix API routes to fetch Hytale players without RCON
All checks were successful
Deploy GSM / deploy (push) Successful in 25s

Add server.type === 'hytale' check to player count API routes,
matching the fix in autoshutdown.js.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-15 14:28:17 +01:00
parent 4b74010ccb
commit 14b031bb93

View File

@@ -348,8 +348,8 @@ router.get('/', optionalAuth, async (req, res) => {
getCurrentMetrics(server.id).catch(() => ({
cpu: 0, cpuCores: 1, memory: 0, memoryUsed: 0, memoryTotal: 0, uptime: 0
})),
server.rconPassword ? getPlayers(server).catch(() => ({ online: 0, max: null })) : { online: 0, max: null },
server.rconPassword ? getPlayerList(server).catch(() => ({ players: [] })) : { players: [] },
(server.rconPassword || server.type === 'hytale') ? getPlayers(server).catch(() => ({ online: 0, max: null })) : { online: 0, max: null },
(server.rconPassword || server.type === 'hytale') ? getPlayerList(server).catch(() => ({ players: [] })) : { players: [] },
getProcessUptime(server).catch(() => 0)
]);