Skip to content

Commit b72757d

Browse files
author
David Wertenteil
authored
Merge pull request #160 from kubescape/dwertent-patch-1
Update triggeraction.go
2 parents 8f624f2 + e14406d commit b72757d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

restapihandler/triggeraction.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func (resthandler *HTTPHandler) ActionRequest(w http.ResponseWriter, r *http.Req
6767
w.WriteHeader(http.StatusInternalServerError)
6868
bErr, _ := json.Marshal(err)
6969
w.Write(bErr)
70-
logger.L().Ctx(r.Context()).Fatal("recover in ActionRequest", helpers.Interface("error", err))
70+
logger.L().Ctx(context.Background()).Fatal("recover in ActionRequest", helpers.Interface("error", err))
7171
}
7272
}()
7373

@@ -80,7 +80,7 @@ func (resthandler *HTTPHandler) ActionRequest(w http.ResponseWriter, r *http.Req
8080
if err == nil {
8181
switch r.Method {
8282
case http.MethodPost:
83-
err = resthandler.HandleActionRequest(r.Context(), readBuffer)
83+
err = resthandler.HandleActionRequest(context.Background(), readBuffer)
8484
default:
8585
httpStatus = http.StatusMethodNotAllowed
8686
err = fmt.Errorf("method '%s' not allowed", r.Method)

0 commit comments

Comments
 (0)