generated from VLADIMIR/template_frontend
ups
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import type { Game, GraphNode, Teams } from './models'
|
||||
import { downloadData } from './qr'
|
||||
|
||||
const API_URL = import.meta.env.VITE_API_URL;
|
||||
|
||||
export const apiGetTeams = async (): Promise<Teams> => {
|
||||
try {
|
||||
const response = await fetch(getApiUrl('/teams'))
|
||||
@@ -129,6 +131,8 @@ export const updateNode = async (code: string, node: GraphNode) => {
|
||||
}
|
||||
|
||||
function getApiUrl(path: string) {
|
||||
// return 'http://' + window.location.host.split(':')[0] + ':8090' + path
|
||||
return 'https://evening-detective-api.crabs-games.art' + path
|
||||
if (API_URL === '') {
|
||||
return 'http://' + window.location.host.split(':')[0] + ':8090' + path
|
||||
}
|
||||
return API_URL + path
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user