takeru0001 5 лет назад
Родитель
Сommit
af1600e004
1 измененных файлов с 2 добавлено и 3 удалено
  1. 2 3
      src/server/routes/apiv3/page.js

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

@@ -289,14 +289,13 @@ module.exports = (crowi) => {
    *          500:
    *            description: Internal server error.
    */
-
   router.get('/exist-paths', loginRequired, validator.exist, apiV3FormValidator, async(req, res) => {
     const { newParentPath, toPaths } = req.query;
 
     try {
-      const descendantsPages = await Page.findListByStartWith(newParentPath, req.user);
+      const { pages } = await Page.findListByStartWith(newParentPath, req.user);
 
-      const duplicationPaths = descendantsPages.pages.map((page) => {
+      const duplicationPaths = pages.map((page) => {
         if (toPaths.includes(page.path)) {
           return page.path;
         }