This commit is contained in:
xuyue committed 2025-05-08 19:27:21 +08:00
1 parent 486ea309a2
commit 06908e165d
4 files changed
+5 -4

No files matched your search

-1
View File
@@ -1 +0,0 @@
VITE_JUDGE0_URL=https://judge0.xuyue.cc
-1
View File
@@ -1 +0,0 @@
VITE_JUDGE0_URL=https://judge0.xuyue.cc
-1
View File
@@ -1 +0,0 @@
VITE_JUDGE0_URL=http://10.13.114.214:8082
+5 -1
View File
@@ -24,8 +24,12 @@ const DEAD_RESULTS = {
},
}
let url = "http://10.13.114.214:8082"
//@ts-ignore
const http = axios.create({ baseURL: import.meta.env.VITE_JUDGE0_URL })
if (import.meta.env.MODE === "production") {
url = "https://judge0.xuyue.cc"
}
const http = axios.create({ baseURL: url })
function encode(string?: string) {
return btoa(String.fromCharCode(...new TextEncoder().encode(string ?? "")))