Fuxi/supabase/functions/judge-challenges/runners/index.ts

10 lines
321 B
TypeScript
Raw Normal View History

2023-12-13 15:56:01 +00:00
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.")
}
}