Skip to content

Commit

Permalink
add filter
Browse files Browse the repository at this point in the history
  • Loading branch information
michelle0927 committed Sep 23, 2024
1 parent 43753fb commit 7229087
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion components/notion/sources/updated-page/updated-page.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,15 @@ export default {
const lastCheckedTimestamp = this.getLastUpdatedTimestamp();
const propertyValues = this._getPropertyValues();

const params = this.lastUpdatedSortParam();
const params = {
...this.lastUpdatedSortParam(),
filter: {
timestamp: "last_edited_time",
last_edited_time: {
on_or_after: new Date(lastCheckedTimestamp).toISOString(),
},
},
};
let newLastUpdatedTimestamp = lastCheckedTimestamp;
const properties = await this.getProperties();
const pagesStream = this.notion.getPages(this.databaseId, params);
Expand Down

0 comments on commit 7229087

Please sign in to comment.