|
|
@@ -5,9 +5,9 @@ const logger = loggerFactory('growi:routes:apiv3:pages'); // eslint-disable-line
|
|
|
const express = require('express');
|
|
|
const pathUtils = require('growi-commons').pathUtils;
|
|
|
|
|
|
+const { body } = require('express-validator/check');
|
|
|
const ErrorV3 = require('../../models/vo/error-apiv3');
|
|
|
|
|
|
-const { body } = require('express-validator/check');
|
|
|
|
|
|
const router = express.Router();
|
|
|
|
|
|
@@ -28,7 +28,6 @@ module.exports = (crowi) => {
|
|
|
const PageTagRelation = crowi.model('PageTagRelation');
|
|
|
const GlobalNotificationSetting = crowi.model('GlobalNotificationSetting');
|
|
|
|
|
|
-
|
|
|
const globalNotificationService = crowi.getGlobalNotificationService();
|
|
|
const userNotificationService = crowi.getUserNotificationService();
|
|
|
|
|
|
@@ -55,7 +54,6 @@ module.exports = (crowi) => {
|
|
|
body, grant, grantUserGroupId, pageTags, overwriteScopesOfDescendants, isSlackEnabled, slackChannels, socketClientId,
|
|
|
} = req.body;
|
|
|
|
|
|
-
|
|
|
let { path } = req.body;
|
|
|
|
|
|
// check whether path starts slash
|
|
|
@@ -192,7 +190,6 @@ module.exports = (crowi) => {
|
|
|
logger.error('Failed to find the pages');
|
|
|
}
|
|
|
|
|
|
-
|
|
|
// check whether path starts slash
|
|
|
newPagePath = pathUtils.addHeadingSlash(newPagePath);
|
|
|
|
|
|
@@ -207,7 +204,6 @@ module.exports = (crowi) => {
|
|
|
req.body.grantUserGroupId = page.grantedGroup;
|
|
|
req.body.pageTags = originTags;
|
|
|
|
|
|
-
|
|
|
// check page existence
|
|
|
const isExist = (await Page.count({ path: req.body.path })) > 0;
|
|
|
if (isExist) {
|