-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: 修复部分文章无法加载的问题,原因是Notion API加载时block上限1000
修复思路是在加载所有文章时,会首先一次性加载数据库中所有block,此时因为上限1000会发生溢出。之后会读取所有page的IDs,然后逐个获取page对应的block。此时如果发现ID查找不到(说明发生了溢出),则再调用API去逐一获取这些溢出了的page。可能这不是最优解。 修改的代码包括: 1. getDataBaseInfoByNotionAPI中添加上述判断逻辑。 2. 修改getPageProperties函数签名,直接传入block对应的value,而不是block数组。
- Loading branch information
1 parent
50eb1a2
commit f73dddd
Showing
6 changed files
with
64 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.