zahmis 5 лет назад
Родитель
Сommit
a715890f2c
2 измененных файлов с 22 добавлено и 7 удалено
  1. 8 2
      src/client/js/components/ArchiveCreateModal.jsx
  2. 14 5
      src/server/routes/apiv3/page.js

+ 8 - 2
src/client/js/components/ArchiveCreateModal.jsx

@@ -56,10 +56,16 @@ const ArchiveCreateModal = (props) => {
   async function done() {
 
     try {
-      await appContainer.apiv3Post('/page/archive', { hoge: 200 });
+      await appContainer.apiv3Post('/page/archive', {
+        isCommentDownload,
+        isFileDownload,
+        isSubordinatedPageDownload,
+        fileType,
+        hierarchyType,
+        hierarchyValue,
+      });
       toastSuccess('Create Archive');
     }
-
     catch (e) {
       toastError(e);
     }

+ 14 - 5
src/server/routes/apiv3/page.js

@@ -187,11 +187,20 @@ module.exports = (crowi) => {
   });
 
   router.post('/archive', accessTokenParser, loginRequired, csrf, async(req, res) => {
-    const { hoge } = req.body;
-
-    console.log(hoge);
-
-    return res.apiv3({ });
+    const isCommentDownload = req.body.isCommentDownload;
+    const isFileDownload = req.body.isFileDownload;
+    const isSubordinatedPageDownload = req.body.isSubordinatedPageDownload;
+    const fileType = req.body.fileType;
+    const hierarchyType = req.body.hierarchyType;
+    const hierarchyValue = req.body.hierarchyValue;
+
+    console.log(isCommentDownload);
+    console.log(isFileDownload);
+    console.log(fileType);
+    console.log(isSubordinatedPageDownload);
+    console.log(hierarchyType);
+    console.log(hierarchyValue);
+    return res.apiv3({});
   });
 
   return router;