]> git.cworth.org Git - empires-server/blobdiff - lmno.js
Drop the "name" entry from the game-engine exports
[empires-server] / lmno.js
diff --git a/lmno.js b/lmno.js
index 7fe42659c28d8dde86a9c734fdb83659c0923086..69e445a24e3ab1fde24bdc4df4a0e50c059ff993 100644 (file)
--- 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 () {