mirror of
https://github.com/Terncode/pixel.horse.git
synced 2026-09-24 13:55:04 +02:00
Update to node 20
This commit is contained in:
@@ -57,7 +57,8 @@ export default function (settings: Settings, live: ServerLiveSettings, statsTrac
|
||||
const app = Router();
|
||||
|
||||
app.get('/game/status', offline(settings), (req, res) => {
|
||||
const status = getGameStatus(servers, live, req.query.short === 'true', req.query.d | 0);
|
||||
const d = typeof req.query?.d === 'number' ? req.query?.d : (typeof req.query?.d === 'string' ? parseInt(req.query?.d, 16) : 0);
|
||||
const status = getGameStatus(servers, live, req.query.short === 'true', d | 0);
|
||||
res.json(status);
|
||||
statsTracker.logRequest(req, status);
|
||||
});
|
||||
|
||||
@@ -3,7 +3,7 @@ import { logger } from './logger';
|
||||
import { createFromRequest } from './reporter';
|
||||
import { IClient, Reporter } from './serverInterfaces';
|
||||
import { ServerConfig } from '../common/adminInterfaces';
|
||||
import { isError } from 'lodash';
|
||||
import { isError } from '../common/utils';
|
||||
|
||||
export interface UserErrorInfo {
|
||||
error?: Error;
|
||||
|
||||
Reference in New Issue
Block a user