Make the obsolescence message work in and older version of node.

This commit is contained in:
PhilRunninger 2024-04-01 18:06:23 -04:00
parent 44dd489377
commit 5033b753ff

View File

@ -71,7 +71,11 @@ function process_route(route, description, path, req, res, callback) {
}
if (!supported_version(req.body.version)) {
console.log(`${timestamp()} ${error()}${req.body.username ?? 'Anonymous'} is using a too-old version of the client - ${req.body.version}`);
if (req.body.username) {
console.log(`${timestamp()} ${error()}${req.body.username} is using a too-old version of the client - ${req.body.version}`);
} else {
console.log(`${timestamp()} ${error()}'Anonymous user is using a too-old version of the client - ${req.body.version}`);
}
res.send(`Obsolete client workbook, version ${req.body.version}`);
return;
}