From da31560cbb4678376e32af417a1c9ee47f031330 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Mon, 29 Jun 2020 14:27:36 -0700 Subject: [PATCH] Send kudos as a Boolean alongside each word group This is how the server is now expecting these to come in, (now that it's actually scoring them). --- empathy/empathy.jsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/empathy/empathy.jsx b/empathy/empathy.jsx index b1f4ab2..570e585 100644 --- a/empathy/empathy.jsx +++ b/empathy/empathy.jsx @@ -508,8 +508,11 @@ class Ambiguities extends React.PureComponent { const response = await fetch_post_json( `judged/${this.props.prompt.id}`,{ - word_groups: this.state.word_sets.map(set => Array.from(set)), - kudos: this.state.starred ? Array.from(this.state.starred) : null + word_groups: this.state.word_sets.map( + set => ({ + words: Array.from(set), + kudos: this.state.starred === set ? true : false + })) } ); -- 2.43.0