Browse Source

delete convert

takeru0001 5 years ago
parent
commit
2e65b78a87
1 changed files with 2 additions and 6 deletions
  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 ComparePathsTable from './ComparePathsTable';
 import DuplicatedPathsTable from './DuplicatedPathsTable';
 import DuplicatedPathsTable from './DuplicatedPathsTable';
 
 
-import { convertToNewAffiliationPath } from '../../../lib/util/path-utils';
 
 
 const PageRenameModal = (props) => {
 const PageRenameModal = (props) => {
   const {
   const {
@@ -77,12 +76,9 @@ const PageRenameModal = (props) => {
   }, [props.isOpen, updateSubordinatedList]);
   }, [props.isOpen, updateSubordinatedList]);
 
 
 
 
-  const checkExistPaths = async(newParentPath, subordinatedPages) => {
+  const checkExistPaths = async(newParentPath) => {
     try {
     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;
       const { existPaths } = res.data;
       setExistingPaths(existPaths);
       setExistingPaths(existPaths);
     }
     }