소스 검색

rename relatedPage

itizawa 6 년 전
부모
커밋
8bf7925a34
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/server/routes/page.js

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

@@ -446,8 +446,8 @@ module.exports = function(crowi, app) {
     const layoutName = configManager.getConfig('crowi', 'customize:layout');
     let view = `layout-${layoutName}/page`;
 
-    // TODO find page by link
-    const page = await ShareLink.find({ _id: link }).populate('Page');
+    const shareLink = await ShareLink.find({ _id: link }).populate('Page');
+    const page = shareLink.relatedPage;
 
     if (page == null) {
       // page is not found