From fdc925331dec81bbe49c3e58c88ef0ab0abf569d Mon Sep 17 00:00:00 2001 From: Jennie Robinson Faber Date: Sat, 4 Apr 2026 14:00:17 +0100 Subject: [PATCH] fix: consolidate Helcim token to HELCIM_API_TOKEN for both server and widget --- .env.example | 9 ++++----- nuxt.config.ts | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.env.example b/.env.example index 2ea2937..d59ecce 100644 --- a/.env.example +++ b/.env.example @@ -1,13 +1,12 @@ # Database Configuration MONGODB_URI=mongodb://localhost:27017/ghostguild -# Helcim Payment Configuration (Public - used in frontend) -NUXT_PUBLIC_HELCIM_TOKEN=your-helcim-js-token +# Helcim Configuration +# Switch between test and live by commenting/uncommenting: +# HELCIM_API_TOKEN=your-live-helcim-api-token +HELCIM_API_TOKEN=your-test-helcim-api-token NUXT_PUBLIC_HELCIM_ACCOUNT_ID=your-helcim-account-id -# Helcim API Configuration (Private - server-side only) -HELCIM_API_TOKEN=your-helcim-api-token - # Email Configuration (Resend) RESEND_API_KEY=your-resend-api-key RESEND_FROM_EMAIL=noreply@ghostguild.org diff --git a/nuxt.config.ts b/nuxt.config.ts index 3e90a3f..56b53a5 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -47,7 +47,7 @@ export default defineNuxtConfig({ process.env.MONGODB_URI || "mongodb://localhost:27017/ghostguild", jwtSecret: process.env.JWT_SECRET || "", resendApiKey: process.env.RESEND_API_KEY || "", - helcimApiToken: process.env.HELCIM_API_TOKEN || "", + helcimApiToken: process.env.HELCIM_API_TOKEN || "", // also exposed to client via public.helcimToken slackBotToken: process.env.SLACK_BOT_TOKEN || "", slackSigningSecret: process.env.SLACK_SIGNING_SECRET || "", slackVettingChannelId: process.env.SLACK_VETTING_CHANNEL_ID || "", @@ -57,7 +57,7 @@ export default defineNuxtConfig({ // Public keys (available on client-side) public: { - helcimToken: process.env.NUXT_PUBLIC_HELCIM_TOKEN || "", + helcimToken: process.env.HELCIM_API_TOKEN || "", helcimAccountId: process.env.NUXT_PUBLIC_HELCIM_ACCOUNT_ID || "", cloudinaryCloudName: process.env.NUXT_PUBLIC_CLOUDINARY_CLOUD_NAME || "divzuumlr",