mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-18 15:09:34 +00:00
减小前端大小
This commit is contained in:
@@ -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 = []
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user