File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1
1
import pMemoize from 'p-memoize'
2
- import { getAllPagesInSpace } from 'notion-utils'
2
+ import { getAllPagesInSpace , uuidToId } from 'notion-utils'
3
3
4
4
import * as types from './types'
5
5
import { includeNotionIdInUrls } from './config'
@@ -16,10 +16,15 @@ export async function getAllPagesImpl(
16
16
rootNotionPageId : string ,
17
17
rootNotionSpaceId : string
18
18
) : Promise < Partial < types . SiteMap > > {
19
+ const getPage = async ( pageId : string , ...args ) => {
20
+ console . log ( '\nnotion getPage' , uuidToId ( pageId ) )
21
+ return notion . getPage ( pageId , ...args )
22
+ }
23
+
19
24
const pageMap = await getAllPagesInSpace (
20
25
rootNotionPageId ,
21
26
rootNotionSpaceId ,
22
- notion . getPage . bind ( notion )
27
+ getPage
23
28
)
24
29
25
30
const canonicalPageMap = Object . keys ( pageMap ) . reduce (
You can’t perform that action at this time.
0 commit comments