Skip to content

Commit

Permalink
chore: update notion
Browse files Browse the repository at this point in the history
  • Loading branch information
bigint committed Feb 24, 2024
1 parent 0bbd49d commit f1c47fa
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions apps/api/src/lib/notion/pushToNotionDatabase.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import createNotionClient from './createNotionClient';

const notion = createNotionClient();

const pushToNotionDatabase = async (database_id: string, properties: any) => {
const notion = createNotionClient();
const newPage = await notion.pages.create({
parent: { database_id },
properties
});
try {
const newPage = await notion.pages.create({
parent: { database_id },
properties
});

return newPage;
return newPage;
} catch {}
};

export default pushToNotionDatabase;

0 comments on commit f1c47fa

Please sign in to comment.