fix monaco-editor.

This commit is contained in:
2023-04-03 19:14:55 +08:00
parent 9228f3d169
commit 8478c15e55
5 changed files with 20 additions and 11 deletions

View File

@@ -1,9 +1,9 @@
import axios from "axios"
import { DEAD_RESULTS } from "./constants"
import { decode, encode } from "./functions"
import { decode, encode, protocol } from "./functions"
import { Code } from "./types"
const http = axios.create({ baseURL: "https://judge0api.hyyz.izhai.net" })
const http = axios.create({ baseURL: `${protocol}://judge0api.hyyz.izhai.net` })
export async function createTestSubmission(code: Code, input: string) {
const encodedCode = encode(code.value)