1
0
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:
Gani Georgiev 2023-06-26 12:47:56 +03:00
parent e6cf4ad2ef
commit 68157a3a65
2 changed files with 2 additions and 2 deletions

View File

@ -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))
}

View File

@ -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,
},
}