successfully connecting to prod

This commit is contained in:
metacryst
2026-03-17 07:00:27 -05:00
parent 530ea7da89
commit d1e4814593
7 changed files with 43 additions and 31 deletions

View File

@@ -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: {