Просмотр исходного кода

Merge branch 'add-pagination-in-endpoint-of-attachment' into add-pagination-for-displaying-attachment-data

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

+ 4 - 2
src/server/routes/apiv3/attachment.js

@@ -45,7 +45,6 @@ module.exports = (crowi) => {
 
     try {
       const pageId = req.query.pageId;
-
       // check whether accessible
       const isAccessible = await Page.isAccessiblePageByViewer(pageId, req.user);
       if (!isAccessible) {
@@ -54,7 +53,10 @@ module.exports = (crowi) => {
       }
 
       const attachments = await Attachment.find({ page: pageId });
-      const pagination = await Attachment.paginate({ page: pageId }, { queryOptions });
+      const pagination = await Attachment.paginate(
+        { page: pageId },
+        queryOptions,
+      );
 
       const result = { attachments, pagination };
       return res.apiv3({ result });