From d26264a3fc1ea21181e3bf0b079eaa1fdd539802 Mon Sep 17 00:00:00 2001 From: josc146 Date: Wed, 12 Apr 2023 14:25:55 +0800 Subject: [PATCH] chore: compatible credit_grants --- src/popup/Popup.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/popup/Popup.jsx b/src/popup/Popup.jsx index 0c561f6..1198515 100644 --- a/src/popup/Popup.jsx +++ b/src/popup/Popup.jsx @@ -33,7 +33,7 @@ function GeneralPart({ config, updateConfig }) { const [balance, setBalance] = useState(null) const getBalance = async () => { - const response = await fetch('https://api.openai.com/dashboard/billing/credit_grants', { + const response = await fetch(`${config.customOpenAiApiUrl}/dashboard/billing/credit_grants`, { headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${config.apiKey}`,