update: ctx.BodyParser (#316)

* update: ctx.BodyParser

* Update ctx.go

fmt file
pull/317/head^2
bestgopher 2020-04-28 20:18:02 +08:00 committed by GitHub
parent 029e3a9a56
commit 1cf0d257c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

2
ctx.go
View File

@ -287,7 +287,7 @@ func (ctx *Ctx) BodyParser(out interface{}) error {
if ctx.Fasthttp.QueryArgs().Len() > 0 {
data := make(map[string][]string)
ctx.Fasthttp.QueryArgs().VisitAll(func(key []byte, val []byte) {
data[getString(key)] = []string{getString(val)}
data[getString(key)] = append(data[getString(key)], getString(val))
})
return schemaDecoderQuery.Decode(out, data)
}