this.games[id] = {
id: id,
- engine: engine.name,
game: game
};
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. */
});
/* 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 () {