]> git.cworth.org Git - lmno.games/commitdiff
Send kudos as a Boolean alongside each word group
authorCarl Worth <cworth@cworth.org>
Mon, 29 Jun 2020 21:27:36 +0000 (14:27 -0700)
committerCarl Worth <cworth@cworth.org>
Mon, 29 Jun 2020 21:27:36 +0000 (14:27 -0700)
This is how the server is now expecting these to come in, (now that
it's actually scoring them).

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
+          }))
       }
     );