X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;ds=sidebyside;f=empathy.js;h=7dbf5d80c40bf5064a1ee77e091419970aecfd2c;hb=98d81b7b03f2ad279debd6eb1372ca6746eebd88;hp=3b613e672ade0e14e0f4ff03e1b3205b4f78cddd;hpb=091f697a575e87baba119573f9c75348f993c18d;p=lmno-server diff --git a/empathy.js b/empathy.js index 3b613e6..7dbf5d8 100644 --- a/empathy.js +++ b/empathy.js @@ -218,7 +218,9 @@ class Prompt { router.post('/prompts', (request, response) => { const game = request.game; - game.add_prompt(request.body.items, request.body.prompt); + prompt = game.add_prompt(request.body.items, request.body.prompt); + + response.json({ id: prompt.id}); }); router.post('/vote/:prompt_id([0-9]+)', (request, response) => {