]> git.cworth.org Git - lmno.games/commitdiff
empathy: Track change in the server's implementation of /judging
authorCarl Worth <cworth@cworth.org>
Thu, 11 Jun 2020 23:00:23 +0000 (16:00 -0700)
committerCarl Worth <cworth@cworth.org>
Thu, 11 Jun 2020 23:00:23 +0000 (16:00 -0700)
This endpoint now requires the data to have a top-level "word_groups"
property, so here it is.

empathy/empathy.jsx

index 60540c03b8246d84fcab3b5c9dc7507f500c10b4..8c7b9170d8c0b0dbb29ae05f6765d36c1c17ee52 100644 (file)
@@ -332,8 +332,11 @@ class Ambiguities extends React.PureComponent {
   }
 
   async handle_submit() {
-    const response = await fetch_post_json(`judging/${this.props.prompt.id}`,
-                                           this.state.word_groups);
+    const response = await fetch_post_json(
+      `judging/${this.props.prompt.id}`,{
+        word_groups: this.state.word_groups
+      }
+    );
 
     if (response.status === 200) {
       const result = await response.json();