Code cleanup in api.tsx

This commit is contained in:
Keannu Bernasol 2023-07-27 00:06:32 +08:00
parent 3331ccb974
commit e4278517bc

View file

@ -9,15 +9,11 @@ import {
StudentData, StudentData,
} from "../../interfaces/Interfaces"; } from "../../interfaces/Interfaces";
export let backendURL = ""; export let backendURL = "https://stude.keannu1.duckdns.org";
export let backendURLWebsocket = ""; export let backendURLWebsocket = "ws://stude.keannu1.duckdns.org";
let use_production = false; if (__DEV__) {
if (__DEV__ && !use_production) {
backendURL = "http://10.0.10.8:8000"; backendURL = "http://10.0.10.8:8000";
backendURLWebsocket = "ws://10.0.10.8:8000"; backendURLWebsocket = "ws://10.0.10.8:8000";
} else {
backendURL = "https://stude.keannu1.duckdns.org";
backendURLWebsocket = "ws://stude.keannu1.duckdns.org";
} }
const instance = axios.create({ const instance = axios.create({