Parcourir la source

fix API calling

Yuki Takei il y a 4 ans
Parent
commit
c3a85a114b

+ 1 - 1
packages/app/src/components/LegacyPrivatePagesMigrationModal.tsx

@@ -34,7 +34,7 @@ export const LegacyPrivatePagesMigrationModal = (props: Props): JSX.Element => {
     const { pages, onSubmited } = status;
     const pageIds = pages.map(page => page.pageId);
     try {
-      await apiv3Post<void>('/legacy-pages-migration', {
+      await apiv3Post<void>('/pages/legacy-pages-migration', {
         pageIds,
         isRecursively: isRecursively ? true : undefined,
       });

+ 1 - 1
packages/app/src/server/routes/apiv3/pages.js

@@ -787,7 +787,7 @@ module.exports = (crowi) => {
   });
 
   // eslint-disable-next-line max-len
-  router.post('/legacy-pages-migration', accessTokenParser, loginRequired, adminRequired, csrf, validator.legacyPagesMigration, apiV3FormValidator, async(req, res) => {
+  router.post('/legacy-pages-migration', accessTokenParser, loginRequired, csrf, validator.legacyPagesMigration, apiV3FormValidator, async(req, res) => {
     const { pageIds: _pageIds, isRecursively } = req.body;
     const pageIds = _pageIds == null ? [] : _pageIds;