itizawa 6 лет назад
Родитель
Сommit
52a4c97dff
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      src/server/routes/page.js

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

@@ -549,7 +549,7 @@ module.exports = function(crowi, app) {
   api.create = async function(req, res) {
     const body = req.body.body || null;
     const pagePath = req.body.path || null;
-    const grant = req.body.grant || null;
+    const grant = req.body.grant || 1;
     const grantUserGroupId = req.body.grantUserGroupId || null;
     const overwriteScopesOfDescendants = req.body.overwriteScopesOfDescendants || null;
     const isSlackEnabled = !!req.body.isSlackEnabled; // cast to boolean
@@ -620,7 +620,7 @@ module.exports = function(crowi, app) {
     const pageBody = req.body.body || null;
     const pageId = req.body.page_id || null;
     const revisionId = req.body.revision_id || null;
-    const grant = req.body.grant || null;
+    const grant = req.body.grant || 1;
     const grantUserGroupId = req.body.grantUserGroupId || null;
     const overwriteScopesOfDescendants = req.body.overwriteScopesOfDescendants || null;
     const isSlackEnabled = !!req.body.isSlackEnabled; // cast to boolean