减小前端大小

This commit is contained in:
tangly1024
2022-04-29 13:26:44 +08:00
parent 3294e03f20
commit 62743e1735
2 changed files with 10 additions and 1 deletions

View File

@@ -23,7 +23,7 @@ export async function getAllPosts({ notionPageData, from, pageType }) {
const pageBlock = notionPageData.block
const schema = notionPageData.schema
const tagOptions = notionPageData.tagOptions
const tagOptions = notionPageData.tags
const collectionQuery = notionPageData.collectionQuery
const data = []

View File

@@ -28,6 +28,15 @@ export async function getGlobalNotionData({
const notionPageData = await getNotionPageData({ pageId, from })
const allPosts = await getAllPosts({ notionPageData, from, pageType })
notionPageData.allPosts = allPosts
// 删除前端不需要的数据
delete notionPageData.block
delete notionPageData.collection
delete notionPageData.collectionQuery
delete notionPageData.schema
delete notionPageData.rawMetadata
delete notionPageData.pageIds
delete notionPageData.tagOptions
delete notionPageData.categoryOptions
return notionPageData
}