Skip to content

Commit

Permalink
code(pkg/trigger/http_server) - use json as default binding
Browse files Browse the repository at this point in the history
  • Loading branch information
PxyUp committed Feb 10, 2024
1 parent 1debcd5 commit f988e2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/trigger/http_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func (s *httpServer) Run(updates chan<- *Message) {
engine.POST(path, func(c *gin.Context) {
msg := json.RawMessage{}

errBind := c.Bind(&msg)
errBind := c.BindJSON(&msg)
if errBind != nil {
s.logger.Errorw("cant bind request data", "error", errBind.Error())
c.Status(http.StatusBadRequest)
Expand Down

0 comments on commit f988e2d

Please sign in to comment.