mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: support multiple key:value search query params (#12690)
This more closely aligns with GitHub's label search style. Actual search params need to be converted to allow this format, by default they will throw an error if they do not support listing.
This commit is contained in:
@@ -163,17 +163,6 @@ func searchTerms(query string, defaultKey func(term string, values url.Values) e
|
||||
}
|
||||
}
|
||||
|
||||
for k := range searchValues {
|
||||
if len(searchValues[k]) > 1 {
|
||||
return nil, []codersdk.ValidationError{
|
||||
{
|
||||
Field: "q",
|
||||
Detail: fmt.Sprintf("Query parameter %q provided more than once, found %d times", k, len(searchValues[k])),
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return searchValues, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user