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

+ 1 - 1
src/client/js/components/PageAttachment.jsx

@@ -33,7 +33,7 @@ class PageAttachment extends React.Component {
     }
     }
 
 
     const res = await this.props.appContainer.apiv3Get('/attachment/list', { pageId });
     const res = await this.props.appContainer.apiv3Get('/attachment/list', { pageId });
-    const attachments = res.data.attachments;
+    const attachments = res.data.result.attachments;
     const inUse = {};
     const inUse = {};
 
 
     for (const attachment of attachments) {
     for (const attachment of attachments) {

+ 1 - 1
src/server/routes/apiv3/attachment.js

@@ -54,7 +54,7 @@ module.exports = (crowi) => {
       }
       }
 
 
       const attachments = await Attachment.find({ page: pageId });
       const attachments = await Attachment.find({ page: pageId });
-      const pagination = await Page.paginate({}, { queryOptions });
+      const pagination = await Attachment.paginate({}, { queryOptions });
 
 
       console.log(pagination);
       console.log(pagination);