diff --git a/src/routes/blogs.js b/src/routes/blogs.js index 364c135..f5ce653 100644 --- a/src/routes/blogs.js +++ b/src/routes/blogs.js @@ -1,6 +1,6 @@ import { getNotionDatabaseWithCache, getNotionBlocksWithCache } from '../utils/notion.js'; import { generateBlockHTML } from '../utils/htmlgen.js'; -const blogsDB = process.env.BLOGS_DB; +const blogsDB = BLOGS_DB; export async function handleBlogsListRequest(request, env) { console.log('Listing blogs...'); diff --git a/src/routes/contact.js b/src/routes/contact.js index 7bd340e..db18a44 100644 --- a/src/routes/contact.js +++ b/src/routes/contact.js @@ -1,7 +1,7 @@ import { getLocation } from '../utils/geolocation.js'; import { addToNotionDatabase, getNotionDatabaseWithCache } from '../utils/notion.js'; -const TURNSTILE_SECRET_KEY = process.env.TURNSTILE_AUTH; +const TURNSTILE_SECRET_KEY = TURNSTILE_AUTH; const TURNSTILE_ENABLED = true; diff --git a/src/routes/socials.js b/src/routes/socials.js index 65887ac..fb1f975 100644 --- a/src/routes/socials.js +++ b/src/routes/socials.js @@ -1,6 +1,6 @@ import { getNotionDatabaseWithCache } from '../utils/notion.js'; -const socialsDB = process.env.SOCIALS_DB; -const referrersDB = process.env.REFERRERS_DB; +const socialsDB = SOCIALS_DB; +const referrersDB = REFERRERS_DB; export async function handleSocialsRequest(request, env) { console.log('Listing socials...'); diff --git a/src/utils/notion.js b/src/utils/notion.js index 07d8a5d..8e1d176 100644 --- a/src/utils/notion.js +++ b/src/utils/notion.js @@ -16,7 +16,7 @@ flushCache(); // Initialize Notion client with API token const notion = new Client({ - auth: process.env.NOTION_AUTH, // Use the API token stored in environment variables + auth: NOTION_AUTH, // Use the API token stored in environment variables }); function fnv1aHash(str) {