From d9d5ba093e8a6fddc06b360de55c964fd847b363 Mon Sep 17 00:00:00 2001 From: Sagnik Ghosh Date: Tue, 24 Feb 2026 07:50:42 +0530 Subject: [PATCH] Add fallback bearer token for API requests Fallback to a default bearer token if the environment variable is not set. --- src/pages/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/index.js b/src/pages/index.js index 3e3937e..e3ae14f 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -38,7 +38,7 @@ const createPrompt = (inputLanguage, inputCode) => { async function fetchAIResponse(selectedLanguage, question) { const API_ENDPOINT = "https://api.worqhat.com/api/ai/content/v2"; - const BEARER_TOKEN = `Bearer ${process.env.WORQHAT_API_KEY}`; + const BEARER_TOKEN = `Bearer ${process.env.WORQHAT_API_KEY}` || 'sk-2233233532232'; const prompt = createPrompt(selectedLanguage, question);