gw api: require at least one group on runs query api
This commit is contained in:
parent
e2bc2043d0
commit
6736f5aebc
|
@ -299,8 +299,14 @@ func (h *RunsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
q := r.URL.Query()
|
q := r.URL.Query()
|
||||||
|
|
||||||
phaseFilter := q["phase"]
|
|
||||||
groups := q["group"]
|
groups := q["group"]
|
||||||
|
// we require that groups are specified to not return all runs
|
||||||
|
if len(groups) == 0 {
|
||||||
|
http.Error(w, "not groups specified", http.StatusBadRequest)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
phaseFilter := q["phase"]
|
||||||
changeGroups := q["changegroup"]
|
changeGroups := q["changegroup"]
|
||||||
_, lastRun := q["lastrun"]
|
_, lastRun := q["lastrun"]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue