mirror of
https://github.com/pocketbase/pocketbase.git
synced 2025-03-18 05:37:49 +02:00
added missing array value normalization
This commit is contained in:
parent
e6cf4ad2ef
commit
68157a3a65
@ -92,7 +92,7 @@ func bindFormData(c echo.Context, i interface{}) error {
|
||||
} else {
|
||||
normalized := make([]any, total)
|
||||
for i, vItem := range v {
|
||||
normalized[i] = vItem
|
||||
normalized[i] = normalizeMultipartValue(vItem)
|
||||
}
|
||||
rv.SetMapIndex(reflect.ValueOf(k), reflect.ValueOf(normalized))
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ func TestBindBody(t *testing.T) {
|
||||
}.Encode(),
|
||||
),
|
||||
echo.MIMEApplicationForm,
|
||||
`{"bool":true,"bools":["true","false"],"number":-123,"numbers":["123","456"],"stings":["str1","str2"],"string":"str"}`,
|
||||
`{"bool":true,"bools":[true,false],"number":-123,"numbers":[123,456],"stings":["str1","str2"],"string":"str"}`,
|
||||
false,
|
||||
},
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user