Browse Source

fix option

Shun Miyazawa 2 years ago
parent
commit
4791a31e14
1 changed files with 3 additions and 2 deletions
  1. 3 2
      apps/app/src/server/routes/apiv3/page/unpublish-page.ts

+ 3 - 2
apps/app/src/server/routes/apiv3/page/unpublish-page.ts

@@ -49,9 +49,10 @@ export const unpublishPageHandlersFactory: UnpublishPageHandlersFactory = (crowi
           return res.apiv3Err(new ErrorV3(`Page ${pageId} is not exist.`), 404);
         }
 
-        page.unpublish();
+        page.unpublish(false); // isNewPage = false
         const updatedPage = await page.save();
-        return res.apiv3({ updatedPage });
+
+        return res.apiv3(updatedPage);
       }
       catch (err) {
         logger.error(err);