Skip to content

Commit

Permalink
fix issue
Browse files Browse the repository at this point in the history
  • Loading branch information
lbi22 committed Oct 30, 2024
1 parent 02c9626 commit 2ebfed8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func handleTrivyReport(w http.ResponseWriter, r *http.Request, es *elasticsearch

// Read and validate the request body
body, err := io.ReadAll(r.Body)
if err != nil || len(bodyBytes) == 0 {
if err != nil || len(body) == 0 {
log.Printf("Invalid request body or empty: %v", err)
http.Error(w, "Invalid request body", http.StatusBadRequest)
return
Expand Down

0 comments on commit 2ebfed8

Please sign in to comment.