From 59734a2b2772dc6702438c84ef796bbd79dd1c51 Mon Sep 17 00:00:00 2001 From: tomato6966 Date: Sun, 22 Dec 2024 00:31:58 +0100 Subject: [PATCH] add note about proxy server --- src/services/yahooFinanceService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/yahooFinanceService.ts b/src/services/yahooFinanceService.ts index 3146108..a52289e 100644 --- a/src/services/yahooFinanceService.ts +++ b/src/services/yahooFinanceService.ts @@ -53,7 +53,7 @@ export const searchAssets = async (query: string): Promise => { type: 'equity,etf', }); - const url = `${API_BASE}/v1/finance/lookup${isDev ? encodeURIComponent(`?${params}`) : `?${params}`}`; + const url = `${API_BASE}/v1/finance/lookup${!isDev ? encodeURIComponent(`?${params}`) : `?${params}`}`; const response = await fetch(url); if (!response.ok) throw new Error('Network response was not ok'); @@ -99,7 +99,7 @@ export const getHistoricalData = async (symbol: string, startDate: string, endDa interval: '1d', }); - const url = `${API_BASE}/v8/finance/chart/${symbol}${isDev ? encodeURIComponent(`?${params}`) : `?${params}`}`; + const url = `${API_BASE}/v8/finance/chart/${symbol}${!isDev ? encodeURIComponent(`?${params}`) : `?${params}`}`; const response = await fetch(url); if (!response.ok) throw new Error('Network response was not ok');