]> git.cworth.org Git - lmno.games/blobdiff - empathy/empathy.jsx
Send kudos as a Boolean alongside each word group
[lmno.games] / empathy / empathy.jsx
index b1f4ab201c71bff8265c88f79186c8234021369a..570e585b3076bda4117842acc009a209a357215b 100644 (file)
@@ -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
+          }))
       }
     );