API: Fixed schema error

This commit is contained in:
diamondburned (Forefront) 2020-05-09 16:25:24 -07:00
parent 0f38294048
commit a298160529
1 changed files with 4 additions and 4 deletions

View File

@ -53,14 +53,14 @@ func WithSchema(schema SchemaEncoder, v interface{}) RequestOption {
return func(r httpdriver.Request) error {
var params url.Values
if v, ok := v.(url.Values); ok {
params = v
if p, ok := v.(url.Values); ok {
params = p
} else {
v, err := schema.Encode(v)
p, err := schema.Encode(v)
if err != nil {
return err
}
params = v
params = p
}
r.AddQuery(params)