mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-20 15:09:40 +00:00
feat&fix(支持私有页面的数据访问): 使用react-notion-x要求的方式进行NotionAPI的配置
(cherry picked from commit d5ae329e2c3a1e18b5fd5fc3507791be9da9b4ed)
This commit is contained in:
@@ -12,6 +12,7 @@ import {
|
||||
} from '../utils'
|
||||
import { extractLangPrefix } from '../utils/pageId'
|
||||
import { mapImgUrl } from './mapImage'
|
||||
import getNotionAPI from '@/lib/notion/getNotionAPI'
|
||||
|
||||
/**
|
||||
* 获取页面元素成员属性
|
||||
@@ -56,7 +57,7 @@ export default async function getPageProperties(
|
||||
case 'person': {
|
||||
const rawUsers = val.flat()
|
||||
const users = []
|
||||
const api = new NotionAPI({ authToken })
|
||||
const api = getNotionAPI()
|
||||
|
||||
for (let i = 0; i < rawUsers.length; i++) {
|
||||
if (rawUsers[i][0][1]) {
|
||||
|
||||
Reference in New Issue
Block a user