From fa3bdc8a5207fc93f4d720771cb6155913f06262 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Thu, 11 Jun 2020 15:57:24 -0700 Subject: [PATCH] Empathy: Change /judging endpoint to expect a top-level word_groups property It's probably wise, (for future-proofing our APIs), if the server looks for an explicitly-named property rather than just slurping up the whole request body. This also keeps the code more consistent with other endpoints, (which is going to be particularly important as I start refactoring things to remove some duplicated code). --- empathy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/empathy.js b/empathy.js index 5635c77..7966d72 100644 --- a/empathy.js +++ b/empathy.js @@ -357,7 +357,7 @@ router.post('/judging/:prompt_id([0-9]+)', (request, response) => { const result = game.receive_judging(prompt_id, request.session.id, - request.body); + request.body.word_groups); response.json(result); if (game.state.players_judged >= game.players.length) -- 2.43.0