This commit is contained in:
2026-05-17 16:06:14 +07:00
parent 6f60e41584
commit 4e61a9d405
6 changed files with 388 additions and 1113 deletions
+6 -2
View File
@@ -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
}