Fuxi/supabase/functions/judge-challenges/runners/index.ts
2023-12-13 23:56:01 +08:00

10 lines
321 B
TypeScript

import { runProgramChallenge } from "./programming.ts";
export async function runChallenge(challenge: any, problem: any, cases: any) {
switch (problem.type) {
case "programming":
return await runProgramChallenge(challenge, problem, cases)
default:
throw new Error("Unsupported problem type.")
}
}