Yuki Takei 2 лет назад
Родитель
Сommit
fdcf79f713
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      apps/app/src/server/routes/apiv3/page/create-page.ts

+ 1 - 1
apps/app/src/server/routes/apiv3/page/create-page.ts

@@ -34,7 +34,7 @@ const logger = loggerFactory('growi:routes:apiv3:page:create-page');
 async function generateUntitledPath(parentPath: string, basePathname: string, index = 1): Promise<string> {
 async function generateUntitledPath(parentPath: string, basePathname: string, index = 1): Promise<string> {
   const Page = mongoose.model<IPage>('Page');
   const Page = mongoose.model<IPage>('Page');
 
 
-  const path = `${normalizePath(parentPath)}${normalizePath(basePathname)}-${index}`;
+  const path = normalizePath(`${normalizePath(parentPath)}/${basePathname}-${index}`);
   if (await Page.exists({ path, isEmpty: false }) != null) {
   if (await Page.exists({ path, isEmpty: false }) != null) {
     return generateUntitledPath(parentPath, basePathname, index + 1);
     return generateUntitledPath(parentPath, basePathname, index + 1);
   }
   }