dev@locazia: edit env api endpoint
This commit is contained in:
parent
2552bd842d
commit
e052f2232f
|
|
@ -10,6 +10,8 @@ function App() {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (window.Telegram && window.Telegram.WebApp) {
|
if (window.Telegram && window.Telegram.WebApp) {
|
||||||
|
console.log(`Requesting API token from ${apiEndpoint}/auth.twa`);
|
||||||
|
|
||||||
fetch(`${apiEndpoint}/auth.twa`, {
|
fetch(`${apiEndpoint}/auth.twa`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
|
|
|
||||||
|
|
@ -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 {
|
export {
|
||||||
apiEndpoint
|
apiEndpoint
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue