From: Carl Worth Date: Mon, 29 Jun 2020 21:27:36 +0000 (-0700) Subject: Send kudos as a Boolean alongside each word group X-Git-Url: https://git.cworth.org/git?p=lmno.games;a=commitdiff_plain;h=da31560cbb4678376e32af417a1c9ee47f031330 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). --- 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 + })) } );