Przeglądaj źródła

adjust spaces to look easily

kaoritokashiki 5 lat temu
rodzic
commit
6c3d208506
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      src/server/routes/apiv3/attachment.js

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

@@ -20,12 +20,13 @@ module.exports = (crowi) => {
 
 
     try {
     try {
       const pageId = req.query.page;
       const pageId = req.query.page;
+
       // check whether accessible
       // check whether accessible
       const isAccessible = await Page.isAccessiblePageByViewer(pageId, req.user);
       const isAccessible = await Page.isAccessiblePageByViewer(pageId, req.user);
-
       if (!isAccessible) {
       if (!isAccessible) {
         return res.json(ApiResponse.error('Current user is not accessible to this page.'));
         return res.json(ApiResponse.error('Current user is not accessible to this page.'));
       }
       }
+
       const attachments = await Attachment.find({ page: pageId });
       const attachments = await Attachment.find({ page: pageId });
       return res.apiv3({ attachments });
       return res.apiv3({ attachments });
     }
     }