diff --git a/apps/execution-service/handlers/submit.go b/apps/execution-service/handlers/submit.go index 44cfa3d49e..1411ffcea7 100644 --- a/apps/execution-service/handlers/submit.go +++ b/apps/execution-service/handlers/submit.go @@ -61,7 +61,6 @@ func (s *Service) ExecuteVisibleAndHiddenTestsAndSubmit(w http.ResponseWriter, r } // Save the collaboration history via the history-service - // TODO: convert to message queue submissionReq := models.Submission{ Code: submission.Code, Language: submission.Language, @@ -90,34 +89,6 @@ func (s *Service) ExecuteVisibleAndHiddenTestsAndSubmit(w http.ResponseWriter, r return } - // get history-service url from os env - // historyServiceUrl := os.Getenv("HISTORY_SERVICE_URL") - // if historyServiceUrl == "" { - // http.Error(w, "HISTORY_SERVICE_URL is not set", http.StatusInternalServerError) - // return - // } - - // req, err := http.NewRequest(http.MethodPost, historyServiceUrl+"histories", - // bytes.NewBuffer(jsonData)) - // if err != nil { - // http.Error(w, err.Error(), http.StatusInternalServerError) - // return - // } - - // req.Header.Set("Content-Type", "application/json") - - // client := &http.Client{} - // resp, err := client.Do(req) - // if err != nil { - // http.Error(w, err.Error(), http.StatusInternalServerError) - // return - // } - // defer resp.Body.Close() - - // if resp.StatusCode != http.StatusOK { - // http.Error(w, "Failed to save submission history", http.StatusInternalServerError) - // } - w.Header().Set("Content-Type", "application/json") w.WriteHeader(http.StatusOK) json.NewEncoder(w).Encode(testResults)