Explorar o código

rename relatedPage

itizawa %!s(int64=6) %!d(string=hai) anos
pai
achega
8bf7925a34
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  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