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

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

@@ -53,8 +53,8 @@ const ArchiveCreateModal = (props) => {
     setHierarchyValue(hierarchyValue);
     setHierarchyValue(hierarchyValue);
   }
   }
 
 
-  async function done() {
 
 
+  async function done() {
     try {
     try {
       await appContainer.apiv3Post('/page/archive', {
       await appContainer.apiv3Post('/page/archive', {
         rootPagePath: props.path,
         rootPagePath: props.path,
@@ -203,7 +203,7 @@ const ArchiveCreateModal = (props) => {
               <div className="my-1 custom-control costom-control-inline">
               <div className="my-1 custom-control costom-control-inline">
                 <input
                 <input
                   type="number"
                   type="number"
-                  min="0"
+                  min="1"
                   max="10"
                   max="10"
                   disabled={hierarchyType === 'allSubordinatedPage'}
                   disabled={hierarchyType === 'allSubordinatedPage'}
                   value={hierarchyValue}
                   value={hierarchyValue}
@@ -239,6 +239,7 @@ ArchiveCreateModal.propTypes = {
   path: PropTypes.string.isRequired,
   path: PropTypes.string.isRequired,
   totalPages: PropTypes.number,
   totalPages: PropTypes.number,
   errorMessage: PropTypes.string,
   errorMessage: PropTypes.string,
+  archiveData: PropTypes.object,
 
 
 };
 };
 
 

+ 3 - 2
src/server/routes/apiv3/page.js

@@ -247,7 +247,7 @@ module.exports = (crowi) => {
 
 
     const numOfPages = 1; // TODO 最終的にzipファイルに取り込むページ数を入れる
     const numOfPages = 1; // TODO 最終的にzipファイルに取り込むページ数を入れる
 
 
-    const createdPageArchive = await PageArchive.create({
+    const createdPageArchive = PageArchive.create({
       owner,
       owner,
       fileType,
       fileType,
       rootPagePath,
       rootPagePath,
@@ -256,7 +256,8 @@ module.exports = (crowi) => {
       hasAttachment: isAttachmentFileDownload,
       hasAttachment: isAttachmentFileDownload,
     });
     });
 
 
-    return res.apiv3({ createdPageArchive });
+    console.log(createdPageArchive);
+    return res.apiv3({ });
 
 
   });
   });