소스 검색

modified showPageForPresentation

Taichi Masuyama 4 년 전
부모
커밋
df5082f402
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      packages/app/src/server/routes/page.js

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

@@ -280,10 +280,10 @@ module.exports = function(crowi, app) {
   }
 
   async function showPageForPresentation(req, res, next) {
-    const path = getPathFromRequest(req);
+    const id = req.params.id;
     const { revisionId } = req.query;
 
-    let page = await Page.findByPathAndViewer(path, req.user);
+    let page = await Page.findByIdAndViewer(id, req.user);
 
     if (page == null) {
       next();