From 73fc800e412faa4fd55af619ac07cf34205ab208 Mon Sep 17 00:00:00 2001 From: nknguyenhc <87511888+nknguyenhc@users.noreply.github.com> Date: Sat, 9 Nov 2024 14:01:11 +0800 Subject: [PATCH] Fix cpp execution error Invalid language --- backend/code-execution-service/server/main.py | 2 +- backend/code-execution-service/worker/execute.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/code-execution-service/server/main.py b/backend/code-execution-service/server/main.py index 8d0832bb3f..1a41a04019 100644 --- a/backend/code-execution-service/server/main.py +++ b/backend/code-execution-service/server/main.py @@ -12,7 +12,7 @@ app = FastAPI() -languages = ["python", "javascript", "typescript", "java", "c", "c++"] +languages = ["python", "javascript", "typescript", "java", "c", "cpp"] authentication = UserAuthentication() diff --git a/backend/code-execution-service/worker/execute.py b/backend/code-execution-service/worker/execute.py index 792d18c5c4..a066dd55dd 100644 --- a/backend/code-execution-service/worker/execute.py +++ b/backend/code-execution-service/worker/execute.py @@ -17,7 +17,7 @@ def execute(code: str, lang: str, input: str, timeout: int) -> tuple[str | None, result = _execute_java(code, input, timeout) case "c": result = _execute_c(code, input, timeout) - case "c++": + case "cpp": result = _execute_cpp(code, input, timeout) _cleanup() return result