Skip to content

Commit

Permalink
update order/events
Browse files Browse the repository at this point in the history
  • Loading branch information
iesreza committed Mar 26, 2024
1 parent dc2dc21 commit 4ea286a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fiber.context.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package evo
import (
"encoding/base64"
"encoding/json"
"encoding/xml"
"errors"
"fmt"
"github.com/getevo/evo/v2/lib/frm"
Expand Down Expand Up @@ -77,7 +78,7 @@ func (r *Request) BodyParser(out any) error {
if strings.HasPrefix(ctype, MIMEApplicationJSON) {
return json.Unmarshal(r.Context.Context().Request.Body(), out)
} else if strings.HasPrefix(ctype, MIMETextXML) || strings.HasPrefix(ctype, MIMEApplicationXML) {
return json.Unmarshal(r.Context.Context().Request.Body(), out)
return xml.Unmarshal(r.Context.Context().Request.Body(), out)
} else if strings.HasPrefix(ctype, MIMEApplicationForm) || strings.HasPrefix(ctype, MIMEMultipartForm) {
dec := frm.NewDecoder(&frm.DecoderOptions{
TagName: "json",
Expand Down

0 comments on commit 4ea286a

Please sign in to comment.