1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2025-01-20 11:37:56 +00:00

API: Fixed schema error

This commit is contained in:
diamondburned (Forefront) 2020-05-09 16:25:24 -07:00
parent 0f38294048
commit a298160529

View file

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