summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
eff8b40)
It was confusing for "create_game" to not return the obvious thing,
(the game that it just created). And now that a game has an "id"
property, it's easy enough to use that when needed.
app.post('/new/:game_engine', (request, response) => {
const game_engine = request.params.game_engine;
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.
});
/* Redirect any requests to a game ID at the top-level.