gatsby-source-notion-churnotion 1.0.80 → 1.0.81
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/api/getPages.js +3 -4
- package/package.json +1 -1
package/dist/api/getPages.js
CHANGED
@@ -139,11 +139,13 @@ const getPages = async ({ databaseId, reporter, getCache, actions, createNode, c
|
|
139
139
|
});
|
140
140
|
}
|
141
141
|
const bookId = page.properties?.book?.relation?.[0]?.id || null;
|
142
|
+
const bookNodeId = createNodeId(`${bookId}-book`);
|
143
|
+
const bookNode = getNode(bookNodeId);
|
142
144
|
const [imageNode, tableOfContents, updatedBlocks, rawText] = await (0, processor_1.processor)(pageData.results, actions, getCache, createNodeId, reporter, cache);
|
143
145
|
const postNode = {
|
144
146
|
id: nodeId,
|
145
147
|
category: parentCategoryId,
|
146
|
-
book:
|
148
|
+
book: bookNode.id,
|
147
149
|
book_index: page.properties?.bookIndex?.number || 0,
|
148
150
|
title: title,
|
149
151
|
content: updatedBlocks,
|
@@ -170,9 +172,6 @@ const getPages = async ({ databaseId, reporter, getCache, actions, createNode, c
|
|
170
172
|
rawText,
|
171
173
|
};
|
172
174
|
await createNode(postNode);
|
173
|
-
// book과 post 부모-자식 관계 설정
|
174
|
-
const bookNodeId = createNodeId(`${bookId}-book`);
|
175
|
-
const bookNode = getNode(bookNodeId);
|
176
175
|
if (bookNode) {
|
177
176
|
createParentChildLink({
|
178
177
|
parent: bookNode,
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "gatsby-source-notion-churnotion",
|
3
3
|
"description": "Gatsby plugin that can connect with One Notion Database RECURSIVELY using official API",
|
4
|
-
"version": "1.0.
|
4
|
+
"version": "1.0.81",
|
5
5
|
"skipLibCheck": true,
|
6
6
|
"license": "0BSD",
|
7
7
|
"main": "./dist/gatsby-node.js",
|