The serverless API for our final software engineering project.

notion.ts 333B

12345678910111213141516
  1. import { NOTION_KEY } from "../config";
  2. interface NotionAuth {}
  3. /**
  4. * Returns authentication configuration for a Notion API `fetch` call.
  5. * @returns
  6. */
  7. export function notionCall(): Partial<RequestInit> {
  8. return {
  9. headers: {
  10. "Notion-Version": "2022-06-28",
  11. Authorization: `Bearer ${NOTION_KEY}`,
  12. },
  13. };
  14. }