Skip to content

Commit

Permalink
part 1 fin.
Browse files Browse the repository at this point in the history
  • Loading branch information
slashexx committed Nov 4, 2024
1 parent ae97b67 commit 8f76050
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions backend/api-gateway/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,14 @@ func executeCode(w http.ResponseWriter, r *http.Request) {
return
}

// Marshal the request to JSON

reqBody, err := json.Marshal(req)
if err != nil {
log.Printf("Error marshaling request: %v", err)
http.Error(w, "Failed to marshal request", http.StatusInternalServerError)
return
}

// Forward the request to the Code Execution Service
resp, err := http.Post("https://codebrewery-code-execution-service.onrender.com/execute", "application/json", bytes.NewBuffer(reqBody))
if err != nil {
log.Printf("Error contacting code execution service: %v", err)
Expand Down

0 comments on commit 8f76050

Please sign in to comment.