Skip to content

Commit 7d979c0

Browse files
committed
update data property
1 parent 776eed2 commit 7d979c0

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

components/notion/common/notion-page-properties.mjs

+8-4
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,16 @@ const NOTION_PAGE_PROPERTIES = {
6464
},
6565
date: {
6666
type: "string",
67-
example: "2022-05-15T18:47:00.000Z",
67+
example: "2022-05-15T18:47:00.000Z or { \"start\": \"2022-05-15T18:47:00.000Z\", \"end\": \"2022-06-15T18:47:00.000Z\" }",
6868
options: () => undefined,
6969
convertToNotion: (property) => ({
70-
date: {
71-
start: property.value,
72-
},
70+
date: !(typeof (property.value) === "string")
71+
? property.value
72+
: property.value.includes("start")
73+
? JSON.parse(property.value)
74+
: {
75+
start: property.value,
76+
},
7377
}),
7478
},
7579
people: {

components/notion/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/notion",
3-
"version": "0.2.4",
3+
"version": "0.2.5",
44
"description": "Pipedream Notion Components",
55
"main": "notion.app.mjs",
66
"keywords": [

0 commit comments

Comments
 (0)