Explorar o código

fix argument without id

itizawa %!s(int64=6) %!d(string=hai) anos
pai
achega
0993716d2e
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  1. 1 2
      src/server/routes/comment.js

+ 1 - 2
src/server/routes/comment.js

@@ -169,7 +169,6 @@ module.exports = function(crowi, app) {
     const { commentForm } = req.body;
     const { commentForm } = req.body;
 
 
     const pageId = commentForm.page_id;
     const pageId = commentForm.page_id;
-    const revisionId = commentForm.revision_id;
     const comment = commentForm.comment;
     const comment = commentForm.comment;
     const isMarkdown = commentForm.is_markdown;
     const isMarkdown = commentForm.is_markdown;
     const commentId = commentForm.comment_id;
     const commentId = commentForm.comment_id;
@@ -188,7 +187,7 @@ module.exports = function(crowi, app) {
     }
     }
 
 
     // check whether accessible
     // check whether accessible
-    const isAccessible = await Page.isAccessiblePageByViewer(pageId, req.user._id, revisionId, comment, isMarkdown, 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.'));
     }
     }