From 1f190b1068ece8b55987f8dd77926f8d53eb70ee Mon Sep 17 00:00:00 2001 From: Boki Date: Fri, 20 Jun 2025 00:07:36 -0400 Subject: [PATCH] removed process.env --- apps/data-service/src/providers/webshare.provider.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/apps/data-service/src/providers/webshare.provider.ts b/apps/data-service/src/providers/webshare.provider.ts index 7006afd..b509b68 100644 --- a/apps/data-service/src/providers/webshare.provider.ts +++ b/apps/data-service/src/providers/webshare.provider.ts @@ -99,18 +99,16 @@ async function fetchProxiesFromWebShare(): Promise { const { getConfig } = await import('@stock-bot/config'); const config = getConfig(); - // Try environment variables first, then fall back to config - const apiKey = process.env.WEBSHARE_API_KEY || config.webshare?.apiKey; - const apiUrl = process.env.WEBSHARE_API_URL || config.webshare?.apiUrl; + // Get configuration from config system + const apiKey = config.webshare?.apiKey; + const apiUrl = config.webshare?.apiUrl; if (!apiKey || !apiUrl) { logger.error('Missing WebShare configuration', { hasApiKey: !!apiKey, hasApiUrl: !!apiUrl, - envApiKey: process.env.WEBSHARE_API_KEY?.substring(0, 10) + '...', - envApiUrl: process.env.WEBSHARE_API_URL, - configApiKey: config.webshare?.apiKey?.substring(0, 10) + '...', - configApiUrl: config.webshare?.apiUrl, + configApiKey: apiKey?.substring(0, 10) + '...', + configApiUrl: apiUrl, }); return null; }