Browse Source

fix post json parameter for real updating content

weichen 4 years ago
parent
commit
7ada4c85d1
1 changed files with 1 additions and 3 deletions
  1. 1 3
      backstage/static/js/editor.js

+ 1 - 3
backstage/static/js/editor.js

@@ -93,9 +93,7 @@ axios.get(contentApiUrl).then(({ data }) => {
 
     const postData = {
       content: mdContent,
-      path: '家具規劃作品/公仔與爵士鼓/index.md',
-      title: 'test_post_index',
-      url: '/collection/test_post_index'
+      url: (JSON.parse(document.getElementById('url').textContent)).url
     }
     axios.post(contentApiUrl, json=postData);
   }