successfully connecting to prod
This commit is contained in:
@@ -4,8 +4,6 @@ import "./Home/Login.js"
|
||||
import "./Home/ConnectionError.js"
|
||||
import util from "./util.js"
|
||||
|
||||
const env = import.meta.env
|
||||
|
||||
let Global = class {
|
||||
Socket = new Socket()
|
||||
profile = null
|
||||
@@ -34,7 +32,7 @@ let Global = class {
|
||||
async fetchAppData() {
|
||||
let personalSpace = this.currentNetwork === this.profile
|
||||
if (personalSpace) { return {} }
|
||||
let appData = await fetch(`${env.VITE_API_URL}/api/${personalSpace ? "my" : "org"}data/` + this.currentNetwork.id, {method: "GET"})
|
||||
let appData = await fetch(`${util.HOST}/api/${personalSpace ? "my" : "org"}data/` + this.currentNetwork.id, {method: "GET"})
|
||||
let json = await appData.json()
|
||||
return json
|
||||
}
|
||||
@@ -119,7 +117,7 @@ let Global = class {
|
||||
|
||||
async getProfile() {
|
||||
try {
|
||||
const res = await util.authFetch(`${env.VITE_API_URL}/profile`, {
|
||||
const res = await util.authFetch(`${util.HOST}/profile`, {
|
||||
method: "GET",
|
||||
credentials: "include",
|
||||
headers: {
|
||||
|
||||
Reference in New Issue
Block a user