X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=lmno.js;h=9998c734a2dc63b8f0f0943a928a1d76c73e4102;hb=493acb2b3b21f592d0ab958ba2875bb412eb8468;hp=5d7d5687522a214c7c8a82633d74c8930eee45b2;hpb=eff8b40b8ee5bccc0990a49791365abb3b64b8b1;p=lmno-server diff --git a/lmno.js b/lmno.js index 5d7d568..9998c73 100644 --- a/lmno.js +++ b/lmno.js @@ -72,7 +72,7 @@ class LMNO { this.games[id] = game; - return id; + return game; } } @@ -108,8 +108,8 @@ function lmno_canonize(id) { app.post('/new/:game_engine', (request, response) => { const game_engine = request.params.game_engine; - const game_id = lmno.create_game(game_engine); - response.send(JSON.stringify(game_id)); + const game = lmno.create_game(game_engine); + response.send(JSON.stringify(game.id)); }); /* Redirect any requests to a game ID at the top-level.