support both scope and scopes parameter in decisions filter (#2882)
This commit is contained in:
parent
e8ff13bc17
commit
6daaab1789
|
@ -49,7 +49,7 @@ func BuildDecisionRequestWithFilter(query *ent.DecisionQuery, filter map[string]
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.Wrapf(InvalidFilter, "invalid contains value : %s", err)
|
return nil, errors.Wrapf(InvalidFilter, "invalid contains value : %s", err)
|
||||||
}
|
}
|
||||||
case "scopes":
|
case "scopes", "scope": //Swagger mentions both of them, let's just support both to make sure we don't break anything
|
||||||
scopes := strings.Split(value[0], ",")
|
scopes := strings.Split(value[0], ",")
|
||||||
for i, scope := range scopes {
|
for i, scope := range scopes {
|
||||||
switch strings.ToLower(scope) {
|
switch strings.ToLower(scope) {
|
||||||
|
|
Loading…
Reference in a new issue