zahmis 5 лет назад
Родитель
Сommit
e4946df3a0
2 измененных файлов с 1 добавлено и 7 удалено
  1. 0 2
      src/client/js/components/PageDuplicateModal.jsx
  2. 1 5
      src/server/routes/apiv3/pages.js

+ 0 - 2
src/client/js/components/PageDuplicateModal.jsx

@@ -6,7 +6,6 @@ import {
 } from 'reactstrap';
 } from 'reactstrap';
 
 
 import { withTranslation } from 'react-i18next';
 import { withTranslation } from 'react-i18next';
-
 import { withUnstatedContainers } from './UnstatedUtils';
 import { withUnstatedContainers } from './UnstatedUtils';
 
 
 import AppContainer from '../services/AppContainer';
 import AppContainer from '../services/AppContainer';
@@ -27,7 +26,6 @@ const PageDuplicateModal = (props) => {
   const [errorMessage, setErrorMessage] = useState(null);
   const [errorMessage, setErrorMessage] = useState(null);
   const [subordinatedPaths, setSubordinatedPaths] = useState([]);
   const [subordinatedPaths, setSubordinatedPaths] = useState([]);
   const [getSubordinatedError, setGetSuborinatedError] = useState(null);
   const [getSubordinatedError, setGetSuborinatedError] = useState(null);
-
   const [isDuplicateRecursively, setIsDuplicateRecursively] = useState(true);
   const [isDuplicateRecursively, setIsDuplicateRecursively] = useState(true);
 
 
   /**
   /**

+ 1 - 5
src/server/routes/apiv3/pages.js

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