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