Fixed env vars

This commit is contained in:
Tom Butcher 2025-03-25 21:36:32 +00:00
parent 937f0f57e2
commit 7809863117
4 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,6 @@
import { getNotionDatabaseWithCache, getNotionBlocksWithCache } from '../utils/notion.js'; import { getNotionDatabaseWithCache, getNotionBlocksWithCache } from '../utils/notion.js';
import { generateBlockHTML } from '../utils/htmlgen.js'; import { generateBlockHTML } from '../utils/htmlgen.js';
const blogsDB = process.env.BLOGS_DB; const blogsDB = BLOGS_DB;
export async function handleBlogsListRequest(request, env) { export async function handleBlogsListRequest(request, env) {
console.log('Listing blogs...'); console.log('Listing blogs...');

View File

@ -1,7 +1,7 @@
import { getLocation } from '../utils/geolocation.js'; import { getLocation } from '../utils/geolocation.js';
import { addToNotionDatabase, getNotionDatabaseWithCache } from '../utils/notion.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; const TURNSTILE_ENABLED = true;

View File

@ -1,6 +1,6 @@
import { getNotionDatabaseWithCache } from '../utils/notion.js'; import { getNotionDatabaseWithCache } from '../utils/notion.js';
const socialsDB = process.env.SOCIALS_DB; const socialsDB = SOCIALS_DB;
const referrersDB = process.env.REFERRERS_DB; const referrersDB = REFERRERS_DB;
export async function handleSocialsRequest(request, env) { export async function handleSocialsRequest(request, env) {
console.log('Listing socials...'); console.log('Listing socials...');

View File

@ -16,7 +16,7 @@ flushCache();
// Initialize Notion client with API token // Initialize Notion client with API token
const notion = new Client({ 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) { function fnv1aHash(str) {