takeru0001 5 лет назад
Родитель
Сommit
2e65b78a87
1 измененных файлов с 2 добавлено и 6 удалено
  1. 2 6
      src/client/js/components/PageRenameModal.jsx

+ 2 - 6
src/client/js/components/PageRenameModal.jsx

@@ -19,7 +19,6 @@ import ApiErrorMessageList from './PageManagement/ApiErrorMessageList';
 import ComparePathsTable from './ComparePathsTable';
 import DuplicatedPathsTable from './DuplicatedPathsTable';
 
-import { convertToNewAffiliationPath } from '../../../lib/util/path-utils';
 
 const PageRenameModal = (props) => {
   const {
@@ -77,12 +76,9 @@ const PageRenameModal = (props) => {
   }, [props.isOpen, updateSubordinatedList]);
 
 
-  const checkExistPaths = async(newParentPath, subordinatedPages) => {
+  const checkExistPaths = async(newParentPath) => {
     try {
-      const toPaths = subordinatedPages.map((subordinatedPage) => {
-        return convertToNewAffiliationPath(path, newParentPath, subordinatedPage.path);
-      });
-      const res = await appContainer.apiv3Get('/page/exist-paths', { newParentPath: pageNameInput, toPaths });
+      const res = await appContainer.apiv3Get('/page/exist-paths', { fromPath: path, toPath: newParentPath });
       const { existPaths } = res.data;
       setExistingPaths(existPaths);
     }