Skip to content

Commit 7229087

Browse files
committed
add filter
1 parent 43753fb commit 7229087

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

components/notion/sources/updated-page/updated-page.mjs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,15 @@ export default {
9999
const lastCheckedTimestamp = this.getLastUpdatedTimestamp();
100100
const propertyValues = this._getPropertyValues();
101101

102-
const params = this.lastUpdatedSortParam();
102+
const params = {
103+
...this.lastUpdatedSortParam(),
104+
filter: {
105+
timestamp: "last_edited_time",
106+
last_edited_time: {
107+
on_or_after: new Date(lastCheckedTimestamp).toISOString(),
108+
},
109+
},
110+
};
103111
let newLastUpdatedTimestamp = lastCheckedTimestamp;
104112
const properties = await this.getProperties();
105113
const pagesStream = this.notion.getPages(this.databaseId, params);

0 commit comments

Comments
 (0)