From e052f2232f2032d24aed6cdb1b1c61f415175559 Mon Sep 17 00:00:00 2001 From: user Date: Fri, 23 Feb 2024 16:26:40 +0300 Subject: [PATCH] dev@locazia: edit env api endpoint --- src/App.tsx | 2 ++ src/constantsGlob.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/App.tsx b/src/App.tsx index 2ca312b..99f623b 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -10,6 +10,8 @@ function App() { useEffect(() => { if (window.Telegram && window.Telegram.WebApp) { + console.log(`Requesting API token from ${apiEndpoint}/auth.twa`); + fetch(`${apiEndpoint}/auth.twa`, { method: 'POST', headers: { diff --git a/src/constantsGlob.js b/src/constantsGlob.js index 4d4c38a..aa545aa 100644 --- a/src/constantsGlob.js +++ b/src/constantsGlob.js @@ -1,5 +1,5 @@ -const apiEndpoint: string = process.env.APP_API_ENDPOINT || 'http://192.168.0.170:13807/api/v1'; +const apiEndpoint: string = process.env.REACT_APP_API_ENDPOINT || 'http://192.168.0.170:13807/api/v1'; export { apiEndpoint