fix: use getEnv function

old-agentic-v1^2
Philipp Burckhardt 2023-06-24 15:09:11 -04:00
rodzic 45ef8be1d5
commit 8d07ccaaf2
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -1,5 +1,7 @@
import defaultKy from 'ky' import defaultKy from 'ky'
import { getEnv } from '@/env'
export const POLYGON_API_BASE_URL = 'https://api.polygon.io' export const POLYGON_API_BASE_URL = 'https://api.polygon.io'
/** /**
@ -853,7 +855,7 @@ export class PolygonClient {
readonly apiBaseUrl: string readonly apiBaseUrl: string
constructor({ constructor({
apiKey = process.env.POLYGON_API_KEY, apiKey = getEnv('POLYGON_API_KEY'),
apiBaseUrl = POLYGON_API_BASE_URL, apiBaseUrl = POLYGON_API_BASE_URL,
ky = defaultKy ky = defaultKy
}: { }: {