X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=lmno.js;h=69e445a24e3ab1fde24bdc4df4a0e50c059ff993;hb=40abb70f85a1f833c6dfcc8541db3bf876096616;hp=7fe42659c28d8dde86a9c734fdb83659c0923086;hpb=8feb9aea1b02a89d5ddc316925914acdfeb0d173;p=empires-server diff --git a/lmno.js b/lmno.js index 7fe4265..69e445a 100644 --- a/lmno.js +++ b/lmno.js @@ -72,7 +72,6 @@ class LMNO { this.games[id] = { id: id, - engine: engine.name, game: game }; @@ -137,7 +136,7 @@ app.get('/[a-zA-Z0-9]{4}', (request, response) => { response.sendStatus(404); return; } - response.redirect(301, `/${game.engine}/${game.id}/`); + response.redirect(301, `/${game.game.meta.identifier}/${game.id}/`); }); /* LMNO middleware to lookup the game. */ @@ -263,7 +262,7 @@ for (let key in engines) { }); /* And mount the whole router at the path for the game. */ - app.use(`/${engine.name}/[a-zA-Z0-9]{4}/`, engine.router); + app.use(`/${engine.Game.meta.identifier}/[a-zA-Z0-9]{4}/`, engine.router); } app.listen(4000, function () {